Compilers Multiple Choice Questions & Answers (MCQs) on “SDT Schemes to Specify Translation of various Programming Language Construct – 1”.
1. Which of the following is not a feature of the compiler?
a) Converts it into machine code
b) None of the mentioned
c) Slow for debugging
d) Execution time is more
Answer: d
Clarification: No specified execution time.
2. A programming language is to be designed to run on a machine that does not have a big memory.
a) Prefer a 2 pass compiler
b) Prefer an interpreter
c) Not support recursion
d) All of the mentioned
Answer: d
Clarification: If a language designed to run on a machine then recursion should not be followed it should prefer 2 pass assembler and prefer an interpreter to a compiler.
3. What is linker?
a) Is same as the loader
b) Create a load module
c) Is same as the loader & Create a load module
d) None of the mentioned
Answer: b
Clarification: It creates a module to be loaded.
4. Predictive parsers can be __________
a) Recursive
b) Constructive
c) Non recursive
d) Both Recursive and Constructive
Answer: a
Clarification: The nature of predictive parsers can be Recursive.
5. Producer consumer problem can be solved using __________
a) Semaphores
b) Event counters
c) Monitors
d) All of the mentioned
Answer: d
Clarification: The famous producer consumer problem can be solved by a semaphores event counters as well as monitors.
6. Bottom up parsing involves __________
a) Shift reduce
b) Handle pruning
c) Shift reduce & Handle pruning
d) None of the mentioned
Answer: c
Clarification: The bottom up parsing involves Shift reduce operation and Handle pruning.
7. What is an example of intermediate language?
a) SNOBOL
b) PASCAL
c) COBOL
d) UNCOL
Answer: d
Clarification: Others are HLL.
8. In a two pass assembler the object code generation is done during the __________
a) Second pass
b) First pass
c) Zeroth pass
d) Not done by assembler
Answer: a
Clarification: I second pass object code is generated.