Gujarat Technological UniversitySummer 2025 examination

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

B.E. · Computer Engineering · Semester 7 · Subject code 2170701
Download official PDFView PDF here
Share with your class
Total
70 marks
To pass
23 marks (33%)
Duration
2.5 Hours 2:30 PM – 5:00 PM
Questions
5 with internal choice
No solutions on this paper yetNeed them for your exam? Ask once. Papers that students ask for are solved first, and we aim to add them within 24 hours.

19 of 25 questions on this paper were also asked in other years. 1 more is a type of question GTU sets again with new data. Each is marked below with the years it appeared.See all 28 repeated 2170701 questions, most asked first

Q.1

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

Also asked in Summer 2024 Q2b

(c)
7 marksAsked in 4 of 4 papers

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

Also asked in Summer 2026 Q1c, Winter 2025 Q1c, Summer 2024 Q1c

Q.2

14 Marks
(a)
3 marksAsked in 4 of 4 papers
Explain role of Lexical Analyzer and its input buffering techniques.

Also asked in Summer 2026 Q5b OR, Winter 2025 Q2c OR, Summer 2024 Q2c

(b)
4 marks
Explain finite Automata in brief and explain its role in lexical.
(c)
7 marksSame type asked in 2 of 4 papers
Construct SLR parsing table for the following grammar :
E -> T+E | T
T -> i

Also asked in Winter 2025 Q3c

(c)
7 marksAsked in 2 of 4 papers

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

Also asked in Winter 2025 Q2c

Q.3

14 Marks
(a)
3 marksAsked in 2 of 4 papers
Explain ambiguous grammar with suitable example.

Also asked in Summer 2026 Q4a

(b)
4 marks
Explain three address code mechanism.
(c)
7 marksAsked in 3 of 4 papers
Explain operator precedence parsing method with example.

Also asked in Summer 2026 Q4c OR, Summer 2024 Q3c OR

(a)
3 marks
Explain Parse Tree with appropriate examples.
(b)
4 marksAsked in 2 of 4 papers
Write a difference(s) between CLR, SLR and LALR methods.

Also asked in Summer 2024 Q3b OR

(c)
7 marks
Show that the following grammer
S-> AaAb | BbBa
A -> ϵ
B -> ϵ
is not SLR(1).

Q.4

14 Marks
(a)
3 marksAsked in 3 of 4 papers
List Error Recovery Strategies in Compiler and Explain any one.

Also asked in Summer 2026 Q3a, Winter 2025 Q1b

(b)
4 marksAsked in 3 of 4 papers
Explain various parameter passing methods.

Also asked in Summer 2026 Q4b, Summer 2024 Q4c OR

(c)
7 marksAsked in 2 of 4 papers

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

Also asked in Winter 2025 Q4c

(a)
3 marksAsked in 2 of 4 papers
Explain operator grammar with an example.

Also asked in Winter 2025 Q3b OR

(b)
4 marksAsked in 3 of 4 papers
Discuss synthesized and inherited attributes using a suitable grammar.

Also asked in Summer 2026 Q3b, Summer 2024 Q4b

(c)
7 marksAsked in 4 of 4 papers
Write and explain the generic issues in the design of code generators.

Also asked in Summer 2026 Q5c, Winter 2025 Q5c OR, Summer 2024 Q5c OR

Q.5

14 Marks
(a)
3 marksAsked in 2 of 4 papers
Differentiate: Static v/s Dynamic Memory Allocation

Also asked in Summer 2024 Q5b OR

(b)
4 marksAsked in 3 of 4 papers
Explain Activation record in detail.

Also asked in Winter 2025 Q4b, Summer 2024 Q5a

(c)
7 marksAsked in 3 of 4 papers
Short note on Peephole Optimization Techniques.

Also asked in Summer 2026 Q4b OR, Winter 2025 Q5c

(a)
3 marksAsked in 2 of 4 papers
Explain Control Stack.

Also asked in Summer 2026 Q5b

(b)
4 marksAsked in 2 of 4 papers
Explain Dynamic storage allocation technique.

Also asked in Summer 2024 Q4a OR

(c)
7 marksAsked in 3 of 4 papers
Explain symbol table management

Also asked in Summer 2026 Q4c, Winter 2025 Q4b OR

More Compiler Design papers

Questions repeat across sessions. Working through two or three papers shows you which topics GTU asks most.

Preparing with friends?

Send this paper to your class group. Every question has its own link.

About this paper

Official Gujarat Technological University (GTU) examination paper 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.

ViewDownload PDF