Olete.in
Articles
Mock Tests
🧪 System programming MCQ Quiz Hub
SYSTEMS PROGRAMMING MCQ SET 1
Choose a topic to test your knowledge and improve your System programming skills
1. In compiler design ‘reducing the strength’ refers to
reducing the range of values of input variables
code optimization using cheaper machine instructions
reducing efficiency of program
None of the above
2. A program P calls two subprograms P1 and P2. P1 can fail 50% times and P2 40% times. Then P can fail
50%
60%
10%
70%
3. 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 _________
Symbol resolution
Parsing
Assembly
Relocation
4. Which of the following derivations does a top-down parser use while parsing an input string ? The input is scanned from left to right
Leftmost derivation
Leftmost derivation traced out in reverse
Rightmost derivation traced out till reverse
Rightmost derivation
5. Which of the following concepts means adding new concepts to a program as it runs?
Data hiding
Dynamic loading
Dynamic typing
Dynamic binding
6. In a two-pass assembler, symbol table is
Generated in first pass
Generated in second pass
Not generated at all
Generated and used only in second pass
7. 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)
(ii) (iii) (iv) (i)
(iii) (iv) (ii) (i)
(iv) (i) (iii) (ii)
(iv) (iii) (ii) (i)
8. The translator which performs macro calls expansion is called :
Macro processor
Micro pre-processor
Macro pre-processor
Dynamic linker
9. Which one from the following is false ?
LALR parser is Bottom - Up parser
A parsing algorithm which performs a left to right scanning and a right most deviation is RL (1)
LR parser is Bottom - Up parser
In LL(1), the 1 indicates that there is a one - symbol look - ahead
10. Which phase of compiler generates stream of atoms ?
Syntax analysis
Lexical Analysis
Code generation
Code optimization
11. 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
82 H
78 H
76 H
47 H
12. 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.
Loop unrolling
Strength reduction
Loop concatenation
Loop jamming
13. 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.
I and IV
I only
II and III
IV only
14. 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?
0270H
0170H
01E0H
0370H
15. 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?
Only l
Only ll
Both I and II
Neither I nor II
16. 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
AL=0FH; CF=1; SF=1
AL=F0H; CF=0; SF=0
AL=F1H; CF=1; SF=1
AL=1FH; CF=1; SF=1
17. 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.
Only I
Only II
Both I and II
Both I and II
18. 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.
(A) and (B) only
(A), (B) and (C) only
(B), (C) and (D) only
(B) and (D) only
19. 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?
Replace P + P by 2 * P or Replace 3 + 4 by 7
Replace P * 32 by P<<5
Replace P * 0 by 0
Replace (P<<4) – P by P * 15
20. 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.
I and II
I and III
II and III
I and IV
21. Which of the following is false regarding the evaluation of computer programming languages?
Application oriented features
Efficiency and Readability
Software development
Hardware maintenance cost
22. Which of the following statements is false?
Top-down parsers are LL parsers where first L stands for left-to-right scan and second L stands for a leftmost derivation.
(000)* is a regular expression that matches only strings containing an odd number of zeroes, including the empty string.
Bottom-up parsers are in the LR family, where L stands for left-to-right scan and R stands for rightmost derivation.
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.
23. System calls are usually invoked by using:
A privileged instruction
An indirect jump
A software interrupt
Polling
24. The ............... transfers the executable image of a C++ program from hard disk to main memory.
Compiler
Linker
Debugger
Loader
25. The family of context sensitive languages is ................. under union and ................. under reversal.
closed, not closed
not closed, not closed
closed, closed
not closed, closed
26. 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 β }
Both statements S1 and S2 are incorrect
S1 is incorrect and S2 is correct
S1 is correct and S2 is incorrect
Both statements S1 and S2 are correct
27. 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 ?
Program portability
Easy development
Efficiency
None of the above
28. The scheme of which interpreter translates the source program is known as
Paragraph by paragraph
Instruction by instruction
Line by line
None of the above
29. Portable program means
Program with wheels
Independent from its authors
Independent of platform
None of the above
30. Object modules generated by assembler that contains unresolved external references are resolved for two or more object module by a/an
Operating system
Loader
Linker
Compiler
31. A special software that is used to create a job queue is called
Drive
Spooler
Interpreter
Linkage editor
32. Which of the following permanent database that has an entry for each terminal symbol ?
Literal table
Identifier table
Terminal table
Source table
33. In which way(s) a macroprocessor for assembly language can be implemented ?
Independent two-pass processor
Independent one-pass processor
Expand macrocalls and substitute arguments
All of the above
34. Which of the following can be accessed by transfer vector approach of linking ?
External data segments
External subroutine
Data located in other procedure
All of the above
35. Block or Buffer caches are used to
improve disk performance
handle interrupts
increase the capacity of main memory
speed up main memory Read operations
36. Object code is the output of ……………
Operating System
Compiler or Assembler
only Assembler
only Compiler
37. ‘Macro’ in an assembly level program is …………..
sub program
a complete program
a hardware portion
relative coding
38. Grammar of the programming is checked at …………… phase of compiler.
semantic analysis
code generation
syntax analysis
code optimization
39. Macro-processors are ………….
Hardware
Compiler
Registers
None of the above
40. The dynamic allocation of storage areas with VSAM files is accomplished by
Hashing
Control splits
Overflow areas
Relative recoding
41. Which of the following command the file names in multiple columns?
IS–X
IS
IS–1
IS–f–X
42. In an absolute loading scheme, which loader function is accomplished by a loader?
Re-allocation
Allocation
Linking
Loading
43. Which of the following expression is represented by the parse tree?
(A + B) * C
A + * BC
A + B * C
A * C + B
44. 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
– 61
64
512
4096
45. Which of the following is the most general phase structured grammar?
Regular
Context-sensitive
Context free
None of the above
46. Which of the following is used for grouping of characters into tokens (in a computer)?
A parser
Code optimizer
Code generator
Scanner
47. P: “Program is a step by step execution of the instructions”. Given P, which of the following is true?
Program is a subset of an instruction set.
Program is a sequence of a subset of an instruction set.
Program is a partially ordered set of an instruction set.
All of the above
48. 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
Either (i) or (ii) but not both of these are valid words.
Both (i) and (ii) are valid words and they take identical number of transformations for the production.
Both (i) and (ii) are valid words but they involve different number of transformations in the production.
None of these
49. Recursive functions are executed in a
First in first out-order
Last in first out-order
Parallel fashion
Load balancing
50. In an absolute loading scheme which loader function is accomplished by assembler?
re-allocation
allocation
linking
loading
51. 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 2 3 1
1 1 2 3 3
2 3 1 3 1
2 3 3 2 1
52. Synthesized attribute can be easily simulated by a
LL grammar
Ambiguous grammar
LR grammar
None of the above
53. There exists a construct which returns a value ‘true’ if the argument subquery is:
empty
non-empty
in error
None of the above
54. The linker:
is similar to interpreter
uses source code as its input
is required to create a load module
none of the above
55. A compiler that runs on one machine and produces code for a different machine is called:
Cross compilation
One pass compilation
Two pass compilation
None of the above
Submit