Compilers Questions and Answers – Static Allocation – 1

«
»

This set of Compilers Multiple Choice Questions & Answers (MCQs) focuses on “Static Allocation – 1”.

1. Which phase of compiler is Syntax Analysis?
a) First
b) Second
c) Third
d) None of the mentioned
View Answer

Answer: b
Explanation: It is Second Phase Of Compiler after Lexical Analyzer.
advertisement

2. What is Syntax Analyser also known as?
a) Hierarchical Analysis
b) Hierarchical Parsing
c) None of the mentioned
d) Both of the mentioned
View Answer

Answer: d
Explanation: It is also called as Hierarchical Analysis or Parsing.

3. Syntax Analyser takes Groups Tokens of source Program into Grammatical Production
a) True
b) False
View Answer

Answer: a
Explanation: It Groups Tokens of source Program into Grammatical Production

4. From where it take its input from?
a) Lexical analyser
b) Syntactic Analyser
c) Semantic Analyser
d) None of the mentioned
View Answer

Answer: a
Explanation: A syntax analyzer or parser takes the input from a lexical analyzer in the form of token streams.
advertisement

5. Parsers are expected to parse the whole code
a) True
b) False
View Answer

Answer: a
Explanation: Parsers are expected to parse the whole code even if some errors exist in the program.

6. A grammar for a programming language is a formal description of
a) Syntax
b) Semantics
c) Structure
d) Library
View Answer

Answer: c
Explanation: The grammar clearly indicates that which type of a structure does a program has.

7. Which of these is not true about Symbol Table?
a) All the labels of the instructions are symbols
b) Table has entry for symbol name address value
c) Perform the processing of the assembler directives
d) Created during pass 1
View Answer

Answer: c
Explanation: The Symbol table does not ever perform the processing of the assembler derivative.
advertisement

8. Which of these features of assembler are Machine-Dependent
a) Instruction formats
b) Addressing modes
c) Program relocation
d) All of the mentioned
View Answer

Answer: d
Explanation: All of these options are features of assembler which are machine Dependant.

9. A compiler can check?
a) Logical Error
b) Syntax Error
c) Both Logical and Syntax Error
d) Not Logical and Syntax Error
View Answer

Answer: b
Explanation: No compiler can ever check logical errors.

10. The fourth Generation computer was made up of?
a) Transistor
b) Vacuum tubes
c) Chips
d) Microprocessor chips
View Answer

Answer: d
Explanation: It is the only way to increase its throughput.
advertisement

Sanfoundry Global Education & Learning Series – Compilers.
To practice all areas of Compilers, here is complete set of 1000+ Multiple Choice Questions and Answers.

advertisement
advertisement
advertisement
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage, Advanced C Programming, SAN Storage Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him @ LinkedIn