Olete.in
Articles
Mock Tests
🧪 System programming MCQ Quiz Hub
SYSTEMS PROGRAMMING MCQ SET 2
Choose a topic to test your knowledge and improve your System programming skills
1. Any syntactic construct that can be described by a regular expression can also be described by
Context sensitive grammar
Non context free grammar
Context free grammar
None of the above
2. When a language has the capability to produce new data types, it is said to be:
extensible
encapsulated
overloaded
None of the above
3. An assembly program contains:
imperative and declarative statements
imperative and assembler directives
imperative and declarative statements as well as assembler directives
declarative statements and assembler directives
4. Which of the following are Assembler Directives? (i) EQU (ii) ORIGIN (iii) START (iv) END
(ii), (iii) and (iv)
(i), (iii) and (iv)
(iii) and (iv)
(i), (ii), (iii) and (iv)
5. Assembler program is:
dependent on the operating system
dependent on the compiler
dependent on the hardware
independent of the hardware
6. At the end of parsing,
tokens are identified.
the syntactic groups are identified.
set of instructions are identified.
machine instructions are identified.
7. Dead-code elimination in machine code optimization refers to:
removal of all labels.
removal of values that never get used. c.
removal of function which are not involved.
removal of a module after its use.
8. A parse tree is an annotated parse tree if:
it shows attribute values at each node.
there are no inherited attributes.
it has synthesized nodes as terminal nodes.
every non-terminal nodes is an inherited attribute.
9. In a two pass compiler, during the first pass:
user defined address symbols are correlated with their binary equivalent
the syntax of the statement is checked and mistakes, if any, are listed
object program is generated
semantic of the source program is elucidated
10. A single instruction in an assembly language program contains:
one micro operation
one macro operation
one instruction to be completed in a single pulse
one machine code instruction
11. Absolute loader demands that the programmer needs to know the:
start address of the available main memory
total size of the program
actual address of the data location
absolute values of the operands used
12. Top-down parsers are predictive parsers, because:
next tokens are predicted
length of the parse tree is predicted before hand
lowest node in the parse tree is predicted
next lower level of the parse tree is predicted
13. In the context of compiler design, “reduction in strength” refers to:
code optimization obtained by the use of cheaper machine instructions
reduction in accuracy of the output
reduction in the range of values of input variables
reduction in efficiency of the program
14. How many states can a process be in?
2
3
4
5
15. The parsing technique that avoids back tracking is:
Top-down parsing
Recursive-descent parsing
Predictive
Syntax tree
16. A Top-down Parse generates:
Right-most derivation
Right-most derivation in reverse
Left-most derivation
Left-most derivation in reverse
17. In an absolute loading scheme, which loader function is accomplished by programmer?
Allocation
Linking
Reallocation
Both (a) and (b)
18. Symbol table can be used for:
Checking type compatibility
Suppressing duplication of error message
Storage allocation
All of these above
19. Linking
cannot be performed before relocation
cannot be performed after relocation
can be performed both before and after relocation
is not required if relocation is performed
20. Which of the following is the most general phase-structured grammar ?
Regular
Context-sensitive
Context free
Syntax tree
21. A compiler for a high level language that runs on one machine and produces code for a different machine is called:
Optimizing
One pass compiler
Cross compiler
Multipass compiler
22. The ‘K’ in LR (K) cannot be:
0
1
2
None of These
23. Peep-hole optimization is a form of:
loop optimization
local optimization
constant folding
data flow analysis
24. An operating system is:
Collection of hardware components
Collection of input-output devices
Collection of software routines
All of the above
25. A permanent database of a general model of compiler is................
Identifier table
Page map table
Literal table
Terminal table
26. Loading operating system from secondary memory to primary memory is called...............
Compiling
Booting
Refreshing
Reassembling
27. Which statement is wrong ?
If linked origin ≠ translated origin, relocation must be performed by the linker
If load ≠ linked origin, the loader must perform relocation
A linker always perform relocation, whereas some loaders do not
None of These
28. Tasks done in parsing are:
Check the validity of a source string
Determine the syntactic structure of a source string
Both a and b
None of these
29. YACC builds up ................. parsing table.
LALR
LR
SLR
LLR
30. The action of passing the source program into the proper syntactic class is known as:
Syntax analysis
Lexical analysis
Interpretation analysis
Uniform symbol generation
31. The dynamic binding occurs during the:
Compile time
Run time
Linking time
Pre-processing time
32. A general macro processor is an in built function of:
Loader
Linker
Editor
Assembler
33. Which of the following is not collision Resolution Technique?
Hash addressing
Chaining
Indexing
None of these
34. Which activity is not included in the first pass of two pass assembler?
build the symbol table
construct the intermediate code
separate mnemonic opcode and operand field
none of these
35. If you want to execute more than one program at a time, the systems software that are used must be capable of:
word processing
virtual memory
compiling
multitasking
36. Non modifiable procedures are called:
Serially usable procedure
Concurrent procedure
Re-entrant procedure
Top down procedure
37. Which of the statements related to Compilers is wrong ?
Lexical analysis is breaking the input into tokens
Syntax analysis is for parsing the phrase
Syntax analysis is for analyzing the semantic
None of these
38. Which of the following is the most general phase - structured grammar ?
Regular
Context – Sensitive
Context free
None of these
39. Which activity is not included in the first pass of two pass assemblers ?
Build the symbol table
Construct the machine code
Separate mnemonic opcode and operand fields
None of these
40. The principle of Locality of reference justifies the use of:
Virtual memory
Interrupts
Cache memory
Secondary memory
41. Which activity is not included in the first pass of two pass assemblers?
Build the symbol table
Construct the intermediate code
Separate mnemonic opcode and operand fields
None of the above
42. Code optimization is responsibility of:
Application programmer
System programmer
Operating system
All of the above
43. Which activity is included in the first pass of two pass assemblers?
Build the symbol table
Construct the intermediate code
Separate mnemonic opcode and operand fields
All of the above
44. In two pass assembler the symbol table is used to store:
Label and value
Only value
Mnemonic
Memory Location
45. Not an assembler directive
XCHG
ASSUME
SHORT
DB
46. In a compiler, the task of scanning the source code, to recognize and classify various elements is known as.
Code Optimization
Syntactic Analysis
Lexical Analysis
Semantic Analysis
47. An example of a compiler-compiler is:
JAVA
LEX
YACC
MATLAB
48. Consider the following program fragment in assembly language. What is the value of ax and cx registers after the completion of the doloop? mov ax, 0h mov cx, 0A h doloop: dec ax loop doloop
ax = FFF5 h and cx = 0 h
ax = FFF6 h and cx = 0 h
ax = FFF7 h and cx = 0A h
ax = FFF5 h and cx = 0A h
49. Consider the following assembly program segment. The contents of the destination register ax (in hexadecimal) and the status of Carry Flag (CF) after the execution of above instructions are: stc mov al, 11010110b mov cl, 2 rcl al, 3 rol al, 4 shr al, cl mul cl
ax = 003CH; CF = 0
ax = 001EH; CF = 0
ax = 007BH; CF = 1
ax = 00B7H; CF = 1
50. Match the description of several parts of a classic optimizing compiler in List - I, with the names of those parts in List - II: List - I (a) A part of a compiler that is responsible for recognizing syntax. (b) A part of a compiler that takes as input a stream of characters and produces as output a stream of words along with their associated syntactic categories. (c) A part of a compiler that understand the meanings of variable names and other symbols and checks that they are used in ways consistent with their definitions. (d) An IR-to-IR transformer that tries to improve the IR program in some way (Intermediate representation). List - II (i) Optimizer (ii) Semantic Analysis (iii) Parser (iv) Scanner Code: (a) (b) (c) (d)
(iii) (iv) (i) (ii)
(iv) (iii) (ii) (i)
(ii) (iv) (i) (iii)
(ii) (iv) (iii) (i)
Submit