Compiler Design Week 1 Nptel Assignment Answers 2026
Are you looking for Compiler Design Week 1 Nptel Assignment Answers 2026? You’ve come to the right place! Access the most accurate answers at Progiez.
Table of Contents

Compiler Design Week 1 Nptel Assignment Answers (Jan-Apr 2026)
Que.1
Which phase of the compiler generates target machine code?
a) Lexical Analysis
b) Syntax Analysis
c) Semantic Analysis
d) Code Generation
Que.2
Which phase of a compiler checks syntax errors?
a) Lexical Analysis
b) Syntax Analysis
c) Semantic Analysis
d) Code Generation
Que.3
The number of tokens in the following C statementprintf("%d", 5 + 3 * 2); is
a) 8
b) 11
c) 12
d) 14
Que.4
During semantic analysis, which of the following checks are typically performed?
a) Syntax errors like missing semicolons
b) Type compatibility in expressions, undeclared identifiers, and function call arguments
c) Register allocation for machine code
d) Linking object modules
Que.5
The frontend of a compiler generates Intermediate Code (IC). This Intermediate Code can be executed on
a) Any machine
b) Only a specific machine
c) Only the compiler’s host machine
d) Cannot be executed on any machine
Que.6
The main objective of code optimization in a compiler is to:
a) Reduce program execution time
b) Reduce memory usage
c) Reduce both execution time and memory usage
d) Reduce compilation time
Que.7
The symbol table in a compiler primarily stores:
a) Identifier names and their types
b) Identifier names, types, and memory locations
c) Identifier names, types, memory locations, and scope information
d) Only memory locations of identifiers
Que.8
Which of the following is a key difference between CISC and RISC architectures?
a) CISC has more instructions than RISC
b) RISC instructions are generally simpler than CISC instructions
c) CISC instructions may take multiple cycles; RISC instructions usually take a single cycle
d) All of the above
Que.9
Which of the following is not a part of the Syntax Analysis phase of a compiler?
a) Parse Tree
b) Context-Free Grammar
c) Parsing
d) Lexeme
Que.10
Which of the following is a part of Code Optimization in a compiler?
a) Constant folding
b) Dead code elimination
c) Strength reduction
d) All of the above
(Jan-Apr 2025)
Course Link: Click Here
1. Which phase of compiler does NOT use symbol table?
a) Code generation
b) Syntax Analysis
c) Lexical Analysis
d) None of the other options
2. Which phase of compiler is Syntax Analysis?
a) First
b) Second
c) Third
d) None of the mentioned
3. Output of the syntax analysis is called
a) Parse tree
b) Keyword tree
c) Binary tree
d) All of the other options
4. A peter am the language does not allow integer division operation. This is generally detected in the phase of
a) Lexical Analysis
b) Syntax Analysis
c) Semantic Analysis
d) None of the other options
View Answer
5. 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
6. A compiler can check
a) Logical error
b) Syntax error
c) Both logical error and syntax error
d) Not logical and syntax error
7. Error recovery helps to
a) Report multiple errors
b) Rectify multiple errors
c) Both report and rectify multiple errors
d) None of the other options
8. Converting a hardware description into actual circuitry is known as
a) Silicon Compilation
b) HDL Compilation
c) Circuit Compilation
d) None of the other options
9. Loops are the major targets for optimization since
a) Loop may go to infinite execution
b) Loop body is repeated to several times
c) Condition check takes exceedingly large time
d) None of the other options
10. For maximum speed of execution of target code, temporary variables be best allocated to
a) Swap space
b) Main memory
c) CPU registers
d) None of the other options
11. Intermediate code helps in
a) Program Analysis
b) Code optimization
c) Retargeting code
d) Code check
12. Output file of Lex is___________ the input file is Myfile
a) Myfile.e
b) Myfile.yy.c
c) Myfile.lex
d) Myfile.obj
Compiler Design Week 1 Nptel Assignment Answers
For answers to others Nptel courses, please refer to this link: NPTEL Assignment