📚 Question Bank
Q63 — Compiler Design
⚙
Tags
👁
Hide
☾
Dark
Home
›
UGC NET Paper 2: Computer Science 2nd January 2026 Shift 1
› Compiler Design
Compiler Design
Q63.
Marks: +2.0
UGC NET Paper 2: Computer Science 2nd January 2026 Shift 1
Match the LIST-I with LIST-II
LIST-I (Input)
LIST-II (Compiler Phase)
A. Syntax Tree
I. Code Generator
B. Character Stream
II. Syntax Analyzer
C. Intermediate Representation
III. Semantic Analyzer
D. Token Stream
IV. Lexical Analyzer
Choose the correct answer from the options given below:
1.
А-II. В-III. C-IV, D-I
2.
A-III, B-IV, C-I. D-II
✓ Correct
3.
A-III, B-I, C-IV, D-II
4.
A-I, B-IV, C-II, D-III
Show Solution
Solution
The correct answer is
A-III, B-IV, C-I, D-II
.
Key Points
Matching LIST-I with LIST-II involves identifying the correct compiler phases corresponding to each input or output representation.
Syntax Tree
is associated with the
Semantic Analyzer
.
Character Stream
is handled by the
Lexical Analyzer
.
Intermediate Representation
is generated by the
Code Generator
.
Token Stream
is produced by the
Syntax Analyzer
.
Additional Information
Compiler Phases and Their Functions:
Lexical Analyzer:
Converts a sequence of characters (character stream) into tokens (token stream).
Syntax Analyzer:
Checks for syntactical correctness and generates a syntax tree.
Semantic Analyzer:
Ensures semantic correctness and performs type checking using the syntax tree.
Code Generator:
Produces intermediate code representation or low-level code from the syntax tree.
Importance of Intermediate Representation:
It serves as an abstraction between the source code and the target machine code.
Allows optimizations to be performed before the final code generation.
Role of Tokens in Compilation:
Tokens are the smallest units of a program, like keywords, operators, and identifiers.
The token stream is essential for the syntax analyzer to build the syntax tree.
📄 All “Compiler Design” questions across papers
← Previous
3 / 3 in this subject •
Back to paper
Next →
🏷 Change Tag for this Question
▶
Loading…
Update Tag