This set of Compilers Multiple Choice Questions & Answers (MCQs) focuses on “Syntax Analyser – 1”.
1. Which phase of the compiler is Syntax Analysis?
a) First
b) Second
c) Third
d) None of the mentioned
View Answer
Explanation: It is Second Phase Of Compiler after Lexical Analyzer.
2. Syntax Analyser is also known as ___________
a) Hierarchical Analysis
b) Hierarchical Parsing
c) None of the mentioned
d) Hierarchical Analysis & Parsing
View Answer
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
Explanation: It Groups Tokens of source Program into Grammatical Production.
4. From where it takes its input from?
a) Lexical analyser
b) Syntactic Analyser
c) Semantic Analyser
d) None of the mentioned
View Answer
Explanation: A syntax analyzer or parser takes the input from a lexical analyzer in the form of token streams.
5. Parsers are expected to parse the whole code.
a) True
b) False
View Answer
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
Explanation: The grammar clearly indicates which type of structure does a program has.
7. Which of these is not true about the 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
Explanation: The Symbol table does not ever perform the processing of the assembler derivative.
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
Explanation: All of these options are features of assembler which are machine dependent.
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
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
Explanation: It is the only way to increase its throughput.
Sanfoundry Global Education & Learning Series – Compilers.
To practice all areas of Compilers, here is complete set of 1000+ Multiple Choice Questions and Answers.
- Practice Computer Science MCQs
- Check Computer Science Books
- Practice MCA MCQs
- Apply for Computer Science Internship
- Check Compiler Design Books