Gujarat Technological UniversityWinter 2025 examination

GTU 2170701 Compiler Design (CD) Winter 2025 Solved Paper & Solutions

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 10:30 AM – 1:00 PM
Questions
5 with internal choice
25 step by step solutions on this page

15 of 25 questions on this paper were also asked in other years. 2 more are types 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 marksAsked in 2 of 4 papers
Define compiler, interpreter and assembler.

Also asked in Summer 2026 Q1a

(b)
4 marksAsked in 3 of 4 papers
Explain error recovery strategies in brief.

Also asked in Summer 2026 Q3a, Summer 2025 Q4a

(c)
7 marksAsked in 4 of 4 papers
Discuss phases of compiler in detail.

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

Q.2

14 Marks
(a)
3 marks

Write a regular expression to match a date in the format DD/MM/YYYY, allowing valid days 01–31 and months 01–12.

(b)
4 marksAsked in 2 of 4 papers
Explain the difference between NFA and DFA with example.

Also asked in Summer 2026 Q3b OR

(c)
7 marksAsked in 2 of 4 papers
Explain subset construction method to construct DFA with example.

Also asked in Summer 2025 Q2c OR

(c)
7 marksAsked in 4 of 4 papers
Explain input buffering techniques in detail.

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

Q.3

14 Marks
(a)
3 marksAsked in 2 of 4 papers
Explain S-Attributed Definitions and L-Attributed Definitions.

Also asked in Summer 2026 Q3a OR

(b)
4 marks
Find out FIRST and FOLLOW for the following grammar.
S-> 1AB | ε
A-> 1AC | 0C
B-> 0S
C->
(c)
7 marksSame type asked in 2 of 4 papers
Construct a SLR parsing table for following grammar.
S -> aAb | bB
A -> Aa | ϵ
B -> Bb |ϵ

Also asked in Summer 2025 Q2c

(a)
3 marksAsked in 2 of 4 papers
Give the difference between top down parsing and bottom up parsing.

Also asked in Summer 2026 Q2b

(b)
4 marksAsked in 2 of 4 papers
Check the following grammar is operator or not. Justify your answer.
E -> EOE
E -> id
O -> * | + | -

Also asked in Summer 2025 Q4a OR

(c)
7 marksSame type asked in 2 of 4 papers
Check whether the given grammar is LL (1) or not?
S -> aAC | bB
A -> Abc | Abd | e
B -> f | g
C -> h |i

Also asked in Summer 2026 Q3c

Q.4

14 Marks
(a)
3 marks
Create syntax tree for the following:

(x+y)*(z-w)/(u+v)

(b)
4 marksAsked in 3 of 4 papers
Write a short note on activation records.

Also asked in Summer 2025 Q5b, Summer 2024 Q5a

(c)
7 marksAsked in 2 of 4 papers

Describe Quadruples, Triples and Indirect Triples form of three address code with a suitable example.

Also asked in Summer 2025 Q4c

(a)
3 marks
Create three address code for the following:

(a+b)*(c+d)+(a+b+c)

(b)
4 marksAsked in 3 of 4 papers
Write a short note on symbol table management.

Also asked in Summer 2026 Q4c, Summer 2025 Q5c OR

(c)
7 marks
Discuss various storage allocation strategies in detail.

Q.5

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

Also asked in Summer 2026 Q5a OR

(b)
4 marks
Explain common sub expression removal technique with example.
(c)
7 marksAsked in 3 of 4 papers
Explain peephole optimization techniques with example.

Also asked in Summer 2026 Q4b OR, Summer 2025 Q5c

(a)
3 marks
Explain DAG with suitable example.
(b)
4 marks
Explain strength reduction technique with example.
(c)
7 marksAsked in 4 of 4 papers
Explain issues in the design of a code generator.

Also asked in Summer 2026 Q5c, Summer 2025 Q4c OR, Summer 2024 Q5c 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 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.

ViewDownload PDF