bidezones.com /System programming/SYSTEMS PROGRAMMING MCQ SET 1 Sample Test,Sample questions

Question:
	
‘Macro’ in an assembly level program is …………..

1.sub program

2.a complete program

3.a hardware portion

4.relative coding

Posted Date:-2022-06-04 11:24:24


Question:
	
Consider the following statements related to compiler construction:

I. Lexical Analysis is specified by context-free grammars and implemented by pushdown automata.
II. Syntax Analysis is specified by regular expressions and implemented by finite-state machine.

Which of the above statement(s) is/are correct?

1.Only l

2.Only ll

3. Both I and II

4. Neither I nor II

Posted Date:-2022-06-04 10:59:22


Question:
	
In a two-pass assembler, symbol table is

1.Generated in first pass

2.Generated in second pass

3.Not generated at all

4.Generated and used only in second pass

Posted Date:-2022-06-04 10:44:46


Question:
	
Object code is the output of ……………

1.Operating System

2.Compiler or Assembler

3.only Assembler

4.only Compiler

Posted Date:-2022-06-04 11:23:28


Question:
	
Synthesized attribute can be easily simulated by a

1.LL grammar

2. Ambiguous grammar

3. LR grammar

4.None of the above

Posted Date:-2022-06-04 17:16:08


Question:
	
The ............... transfers the executable image of a C++ program from hard disk to main memory.

1.Compiler

2.Linker

3.Debugger

4.Loader

Posted Date:-2022-06-04 11:11:02


Question:
	
The scheme of which interpreter translates the source program is known as

1.Paragraph by paragraph

2.Instruction by instruction

3.Line by line

4.None of the above

Posted Date:-2022-06-04 11:15:09


Question:
	
The translator which performs macro calls expansion is called :

1.Macro processor

2.Micro pre-processor

3.Macro pre-processor

4.Dynamic linker

Posted Date:-2022-06-04 10:47:36


Question:
	
There exists a construct which returns a value ‘true’ if the argument subquery is:

1.empty

2. non-empty

3. in error

4.None of the above

Posted Date:-2022-06-04 17:17:02


Question:
	
Which of the following are the principles tasks of the linker?

I. Resolve external references among separately compiled program units.
II. Translate assembly language to machine code.
III. Relocate code and data relative to the beginning of the program.
IV. Enforce access-control restrictions on system libraries.

1.I and II

2.I and III

3. II and III

4. I and IV

Posted Date:-2022-06-04 11:05:57


Question:
	
Which of the following derivations does a top-down parser use while parsing an input string ? The input is scanned from left to right

1.Leftmost derivation

2.Leftmost derivation traced out in reverse

3.Rightmost derivation traced out till reverse

4.Rightmost derivation

Posted Date:-2022-06-04 10:42:27


Question:
A compiler that runs on one machine and produces code for a different machine is called:

1. Cross compilation

2.One pass compilation

3.Two pass compilation

4.None of the above

Posted Date:-2022-06-04 17:19:22


Question:
A program P calls two subprograms P1 and P2. P1 can fail 50% times and P2 40% times. Then P can fail

1.50%

2. 60%

3.10%

4. 70%

Posted Date:-2022-06-04 10:26:35


Question:
A shift-reduce parser carries out the actions specified within braces immediately after reducing with the corresponding rule of the grammar.

S -> xxW[print“1”]
S -> y[print“2”]
W -> S2[print“3”], what is the translation of “x x x x y z z”?

1.1 1 2 3 1

2. 1 1 2 3 3

3.2 3 1 3 1

4.2 3 3 2 1

Posted Date:-2022-06-04 17:12:45


Question:
A special software that is used to create a job queue is called

1.Drive

2.Spooler

3.Interpreter

4.Linkage editor

Posted Date:-2022-06-04 11:18:39


Question:
Block or Buffer caches are used to

1.improve disk performance

2.handle interrupts

3.increase the capacity of main memory

4.speed up main memory Read operations

Posted Date:-2022-06-04 11:22:37


Question:
Consider the following assembly language instructions:

mov al, 15
mov ah, 15
xor al, al
mov cl, 3
shr ax, cl
add al, 90H
adc ah, 0

What is the value in ax register after execution of above instructions?

1.0270H

2.0170H

3.01E0H

4.0370H

Posted Date:-2022-06-04 10:58:16


Question:
Consider the following left associative operators in decreasing order of precedence:

– subtraction (highest precedence)
* multiplication
$ exponentiation (lowest precedence)

What is the result of the following expression?

3 – 2 * 4 $ | * 2**3

1.– 61

2.64

3.512

4.4096

Posted Date:-2022-06-04 11:30:45


Question:
From the point of view of the programmer, what are the major advantages of using a high-level language rather than internal machine code or assembly language ?

1.Program portability

2.Easy development

3.Efficiency

4.None of the above

Posted Date:-2022-06-04 11:14:17


Question:
Grammar of the programming is checked at …………… phase of compiler.

1.semantic analysis

2.code generation

3.syntax analysis

4.code optimization

Posted Date:-2022-06-04 11:25:16


Question:
In .............., the bodies of the two loops are merged together to form a single loop provided that they do not make any references to each other.

1.Loop unrolling

2.Strength reduction

3.Loop concatenation

4.Loop jamming

Posted Date:-2022-06-04 10:56:25


Question:
In a MIU puzzle, either of the letters M, I or U could go as a start symbol. Production rules are given
below :

R1 : U→IU
R2 : M.x→M.x.x where ːˑ is string concatenation operator. Given this, which of the following holds for

(i) MIUIUIUIUIU
(ii) MIUIUIUIUIUIUIUIU

1.Either (i) or (ii) but not both of these are valid words.

2.Both (i) and (ii) are valid words and they take identical number of transformations for the production.

3.Both (i) and (ii) are valid words but they involve different number of transformations in the production.

4.None of these

Posted Date:-2022-06-04 11:35:10


Question:
In an absolute loading scheme which loader function is accomplished by assembler?

1.re-allocation

2.allocation

3.linking

4.loading

Posted Date:-2022-06-04 11:44:40


Question:
In an absolute loading scheme, which loader function is accomplished by a loader?

1.Re-allocation

2.Allocation

3.Linking

4.Loading

Posted Date:-2022-06-04 11:28:59


Question:
In compiler design ‘reducing the strength’ refers to

1.reducing the range of values of input variables

2. code optimization using cheaper machine instructions

3.reducing efficiency of program

4.None of the above

Posted Date:-2022-06-04 10:25:25


Question:
In compiler optimization, operator strength reduction uses mathematical identities to replace slow math operations with faster operations. Which of the following code replacements is an illustration of operator strength reduction?

1.Replace P + P by 2 * P or Replace 3 + 4 by 7

2.Replace P * 32 by P<<5

3.Replace P * 0 by 0

4.Replace (P<<4) – P by P * 15

Posted Date:-2022-06-04 11:04:55


Question:
In which way(s) a macroprocessor for assembly language can be implemented ?

1.Independent two-pass processor

2. Independent one-pass processor

3.Expand macrocalls and substitute arguments

4. All of the above

Posted Date:-2022-06-04 11:20:25


Question:
Macro-processors are ………….

1.Hardware

2.Compiler

3.Registers

4.None of the above

Posted Date:-2022-06-04 11:26:08


Question:
Match the following:

(a) Forward Reference Table (i) Assembler directive

(b) Mnemonic Table (ii) Uses array data structure

(c) Segment Register Table (iii) Contains machine OP code

(d) EQU (iv) Uses linked list data structure

code:
(a)   (b)   (c)  (d)

1.(ii) (iii) (iv) (i)

2.(iii) (iv) (ii) (i)

3. (iv) (i) (iii) (ii)

4.(iv) (iii) (ii) (i)

Posted Date:-2022-06-04 10:46:40


Question:
Object modules generated by assembler that contains unresolved external references are resolved for two or more object module by a/an

1.Operating system

2.Loader

3.Linker

4.Compiler

Posted Date:-2022-06-04 11:17:23


Question:
P: “Program is a step by step execution of the instructions”. Given P, which of the following is true?

1.Program is a subset of an instruction set.

2.Program is a sequence of a subset of an instruction set.

3.Program is a partially ordered set of an instruction set.

4.All of the above

Posted Date:-2022-06-04 11:33:58


Question:
Portable program means

1.Program with wheels

2.Independent from its authors

3.Independent of platform

4.None of the above

Posted Date:-2022-06-04 11:15:51


Question:
Recursive functions are executed in a

1.First in first out-order

2. Last in first out-order

3.Parallel fashion

4. Load balancing

Posted Date:-2022-06-04 11:39:09


Question:
System calls are usually invoked by using:

1.A privileged instruction

2.An indirect jump

3.A software interrupt

4.Polling

Posted Date:-2022-06-04 11:09:28


Question:
The content of the accumulator after the execution of the following 8085 assembly language program, is:
MVI A, 42H
MVI B, 05H
UGC: ADD B
DCR B
JNZ UGC
ADI 25H
HLT

1.82 H

2.78 H

3.76 H

4.47 H

Posted Date:-2022-06-04 10:55:15


Question:
The contents of Register (BL) and Register (AL) of 8085 microprocessor are 49H and 3AH respectively. The contents of AL, the status of carry flag (CF) and sign flag (SF) after executing 'SUB AL, BL' assembly language instruction, are

1.AL=0FH; CF=1; SF=1

2.AL=F0H; CF=0; SF=0

3.AL=F1H; CF=1; SF=1

4.AL=1FH; CF=1; SF=1

Posted Date:-2022-06-04 11:01:32


Question:
The dynamic allocation of storage areas with VSAM files is accomplished by

1.Hashing

2.Control splits

3.Overflow areas

4.Relative recoding

Posted Date:-2022-06-04 11:27:04


Question:
The family of context sensitive languages is ................. under union and ................. under reversal.

1.closed, not closed

2.not closed, not closed

3.closed, closed

4.not closed, closed

Posted Date:-2022-06-04 11:12:23


Question:
The linker:

1.is similar to interpreter

2. uses source code as its input

3.is required to create a load module

4.none of the above

Posted Date:-2022-06-04 17:18:19


Question:
The process of assigning load addresses to the various parts of the program and adjusting the code and data in the program to reflect the assigned addresses is called  _________

1.Symbol resolution

2.Parsing

3.Assembly

4.Relocation

Posted Date:-2022-06-04 10:41:20


Question:
Which is the correct statement(s) for Non Recursive predictive parser?

S1: First(α) = {t | α => * t β for some string β } => *tβ
S2: Follow(X) = { a | S => * αXa β for some strings α and β }

1.Both statements S1 and S2 are incorrect

2.S1 is incorrect and S2 is correct

3.S1 is correct and S2 is incorrect

4.Both statements S1 and S2 are correct

Posted Date:-2022-06-04 11:13:27


Question:
Which of the following are not regular?

(A) Strings of even number of a’s.
(B) Strings of a’s, whose length is a prime number.
(C) Set of all palindromes made up of a’s and b’s.
(D) Strings of a’s whose length is a perfect square.

1.(A) and (B) only

2.(A), (B) and (C) only

3. (B), (C) and (D) only

4. (B) and (D) only

Posted Date:-2022-06-04 11:03:57


Question:
Which of the following can be accessed by transfer vector approach of linking ?

1.External data segments

2.External subroutine

3.Data located in other procedure

4.All of the above

Posted Date:-2022-06-04 11:21:28


Question:
Which of the following command the file names in multiple columns?

1.IS–X

2.IS

3.IS–1

4.IS–f–X

Posted Date:-2022-06-04 11:28:13


Question:
Which of the following concepts means adding new concepts to a program as it runs?

1.Data hiding

2.Dynamic loading

3. Dynamic typing

4.Dynamic binding

Posted Date:-2022-06-04 10:43:46


Question:
Which of the following expression is represented by the parse tree?

1.(A + B) * C

2. A + * BC

3. A + B * C

4.A * C + B

Posted Date:-2022-06-04 11:29:52


Question:
Which of the following is false regarding the evaluation of computer programming languages?

1.Application oriented features

2.Efficiency and Readability

3.Software development

4.Hardware maintenance cost

Posted Date:-2022-06-04 11:07:12


Question:
Which of the following is not typically a benefit of dynamic linking?

I. Reduction in overall program execution time.
II. Reduction in overall space consumption in memory.
III. Reduction in overall space consumption on disk.
IV. Reduction in the cost of software updates.

1.I and IV

2. I only

3.II and III

4. IV only

Posted Date:-2022-06-04 10:57:24


Question:
Which of the following is the most general phase structured grammar?

1.Regular

2.Context-sensitive

3.Context free

4.None of the above

Posted Date:-2022-06-04 11:31:29


Question:
Which of the following is used for grouping of characters into tokens (in a computer)?

1.A parser

2.Code optimizer

3.Code generator

4.Scanner

Posted Date:-2022-06-04 11:32:44


Question:
Which of the following permanent database that has an entry for each terminal symbol ?

1. Literal table

2.Identifier table

3.Terminal table

4. Source table

Posted Date:-2022-06-04 11:19:35


Question:
Which of the following statement(s) regarding a linker software is/are true?

I. A function of a linker is to combine several object modules into a single load module.
II. A function of a linker is to replace absolute references in an object module by symbolic references to locations in other modules.

1.Only I

2.Only II

3.Both I and II

4.Both I and II

Posted Date:-2022-06-04 11:02:32


Question:
Which of the following statements is false?

1.Top-down parsers are LL parsers where first L stands for left-to-right scan and second L stands for a leftmost derivation.

2.(000)* is a regular expression that matches only strings containing an odd number of zeroes, including the empty string.

3. Bottom-up parsers are in the LR family, where L stands for left-to-right scan and R stands for rightmost derivation.

4.The class of context-free languages is closed under reversal. That is, if L is any context-free language, then the language LR={WR:wϵL} is context free.

Posted Date:-2022-06-04 11:08:25


Question:
Which one from the following is false ?

1.LALR parser is Bottom - Up parser

2.A parsing algorithm which performs a left to right scanning and a right most deviation is RL (1)

3. LR parser is Bottom - Up parser

4.In LL(1), the 1 indicates that there is a one - symbol look - ahead

Posted Date:-2022-06-04 10:48:39


Question:
Which phase of compiler generates stream of atoms ?

1.Syntax analysis

2. Lexical Analysis

3.Code generation

4.Code optimization

Posted Date:-2022-06-04 10:54:13


More MCQS[bidezones.com ]

  1. SYSTEMS PROGRAMMING MCQ SET 1
  2. SYSTEMS PROGRAMMING MCQ SET 2
  3. SYSTEMS PROGRAMMING /MACHINE STRUCTURE
  4. SYSTEMS PROGRAMMING /MACRO PROCESSOR
  5. SYSTEMS PROGRAMMING /LOADERS MCQ
  6. SYSTEMS PROGRAMMING /PROGRAMMING LANGUAGES MCQ SET 1
  7. SYSTEMS PROGRAMMING /PROGRAMMING LANGUAGES MCQ SET 2
  8. SYSTEMS PROGRAMMING /PROGRAMMING LANGUAGES MCQ SET 3