Gujarat Technological UniversityWinter 2025 Examination

GTU 3170701 Compiler Design (CD) Winter 2025 Paper Solution & PDF

B.E. · Computer Engineering · Semester 7 · Subject Code: 3170701
Download Official GTU PDF
Share:
Total Marks70 MarksExternal theory exam
Passing Marks23 Marks33% minimum cutoff
Exam Duration2.5 Hours10:30 AM – 1:00 PM
Paper Structure5 QuestionsWith internal OR choices
Jump toQ1Q2Q3Q4Q5

Question 1

14 MarksMedium
(a)
Define
1)Compiler
2)Assembler
3)Linker
3 Marks
(b)
Discuss about one pass and two pass compilers
4 Marks
(c)

Explain different phases of compiler. For an expression given below, write output of all phases of a complier. Assume a, b and c of type float. a = b + c * 60

7 Marks

Question 2

14 MarksMedium
(a)
Give difference between compiler and interpreter
3 Marks
(b)
Explain left factoring with suitable example
4 Marks
(c)
Explain recursive decent parser with suitable example.
7 Marks
OR OPTION
(c)

Draw DFA for the following regular expression without construction of NFA. (1 | 0) * 1 (1 | 0) #

7 Marks

Question 3

14 MarksMedium
(a)
Explain context free grammar with suitable examples
3 Marks
(b)
Explain ambiguity and derivation with suitable examples
4 Marks
(c)
Explain operator precedence parser with suitable example
7 Marks
OR OPTION
(a)
Explain backtracking with example
3 Marks
(b)
Explain Syntax-Directed Definitions (SDD) with suitable example
4 Marks
(c)
Check that following grammar is LL (1) or not
E→E+T | T
T→T*F | F
F→(E) | id
7 Marks

Question 4

14 MarksMedium
(a)
Discuss symbol table management
3 Marks
(b)
Explain syntax tree and postfix notation with example
4 Marks
(c)
Explain various error recovery strategies in detail
7 Marks
OR OPTION
(a)
Explain peephole optimization with example
3 Marks
(b)
Discuss activation records
4 Marks
(c)
Explain three address code with suitable example
7 Marks

Question 5

14 MarksMedium
(a)
Explain dead code elimination with example
3 Marks
(b)
Explain synthesized attribute and inherited attribute
4 Marks
(c)
Analyze various design issues of a code generator
7 Marks
OR OPTION
(a)
Discuss blocks and flow graphs
3 Marks
(b)
Explain code-scheduling constraints
4 Marks
(c)
Explain various storage allocation strategies in detail
7 Marks
College Exam Groups

Studying for Compiler Design?

Circulate this solved paper with KaTeX formulas and 1-click AI step solvers to your batchmates on WhatsApp or Telegram.

About this Examination Paper & Attribution

Official Gujarat Technological University (GTU) examination paper and step-by-step solutions for Compiler Design (CD) (Winter 2025, B.E. · Computer Engineering, Sem 7). Features complete 70-mark regular & remedial examination pattern, official marking distribution across all 5 questions, and direct 1-click official PDF download.

Transcribed for student exam preparation from Gujarat Technological University official examination archives. Questions, syllabus guidelines, and curriculum marking schemes remain the intellectual property of Gujarat Technological University.

Download PDF