Gujarat Technological UniversitySummer 2025 Examination

GTU 2170701 Compiler Design (CD) Summer 2025 Paper Solution & PDF

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

Question 1

14 MarksMedium
(a)
Define following terms.
i)Token
ii)Lexeme
iii)Handle pruning
3 Marks
(b)
Draw Transition diagram of following:
i)Relational operators.
ii)Unsigned Operator.
4 Marks
(c)

Explain various Phases of compiler with neat diagram and suitable examples.

7 Marks

Question 2

14 MarksMedium
(a)
Explain role of Lexical Analyzer and its input buffering techniques.
3 Marks
(b)
Explain finite Automata in brief and explain its role in lexical.
4 Marks
(c)
Construct SLR parsing table for the following grammar :
E -> T+E | T
T -> i
7 Marks
OR OPTION
(c)

Explain subset construction method for constructing DFA from an NFA with an example.

7 Marks

Question 3

14 MarksMedium
(a)
Explain ambiguous grammar with suitable example.
3 Marks
(b)
Explain three address code mechanism.
4 Marks
(c)
Explain operator precedence parsing method with example.
7 Marks
OR OPTION
(a)
Explain Parse Tree with appropriate examples.
3 Marks
(b)
Write a difference(s) between CLR, SLR and LALR methods.
4 Marks
(c)
Show that the following grammer
S-> AaAb | BbBa
A -> ϵ
B -> ϵ
is not SLR(1).
7 Marks

Question 4

14 MarksMedium
(a)
List Error Recovery Strategies in Compiler and Explain any one.
3 Marks
(b)
Explain various parameter passing methods.
4 Marks
(c)

Explain quadruples, triple and indirect triple form of three address code with example

7 Marks
OR OPTION
(a)
Explain operator grammar with an example.
3 Marks
(b)
Discuss synthesized and inherited attributes using a suitable grammar.
4 Marks
(c)
Write and explain the generic issues in the design of code generators.
7 Marks

Question 5

14 MarksMedium
(a)
Differentiate: Static v/s Dynamic Memory Allocation
3 Marks
(b)
Explain Activation record in detail.
4 Marks
(c)
Short note on Peephole Optimization Techniques.
7 Marks
OR OPTION
(a)
Explain Control Stack.
3 Marks
(b)
Explain Dynamic storage allocation technique.
4 Marks
(c)
Explain symbol table management
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) (Summer 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