Gujarat Technological UniversitySummer 2026 examination

GTU 2170701 Compiler Design (CD) Summer 2026 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.

17 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 Winter 2025 Q1a

(b)
4 marks
What is the role of lexical analyzer? Justify your answer with example.
(c)
7 marksAsked in 4 of 4 papers
Explain phases of compiler with a neat diagram and suitable example.

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

Q.2

14 Marks
(a)
3 marks
Define
i)Parse tree
ii)Annotated parse tree
iii)Syntax tree.
(b)
4 marksAsked in 2 of 4 papers
Differentiate top down parsing and bottom up parsing.

Also asked in Winter 2025 Q3a OR

(c)
7 marks
Convert the following regular expression to DFA using subset construction method:

((0|1)(0|1))*#

(c)
7 marksSame type asked in 2 of 4 papers

Construct NFA for the following RE using Thomson's construction method and then convert it to DFA: (a|b)*abb

Also asked in Summer 2024 Q2c OR

Q.3

14 Marks
(a)
3 marksAsked in 3 of 4 papers
Explain error recovery strategies in brief.

Also asked in Winter 2025 Q1b, Summer 2025 Q4a

(b)
4 marksAsked in 3 of 4 papers
Differentiate between synthesized and inherited attributes with example.

Also asked in Summer 2025 Q4b OR, Summer 2024 Q4b

(c)
7 marksSame type asked in 2 of 4 papers
Construct LL(1) parsing table for E→E + T|T, T→T * F|F, F→(E)|a

Also asked in Winter 2025 Q3c OR

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

Also asked in Winter 2025 Q3a

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

Also asked in Winter 2025 Q2b

(c)
7 marks
Construct LR (1) item set for following grammar.
E -> E+T | T
T -> T*F | F
F -> id

Q.4

14 Marks
(a)
3 marksAsked in 2 of 4 papers
What is Ambiguous Grammar? Describe with example.

Also asked in Summer 2025 Q3a

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

Also asked in Summer 2025 Q4b, Summer 2024 Q4c OR

(c)
7 marksAsked in 3 of 4 papers
Explain various data structures used in symbol table management.

Also asked in Winter 2025 Q4b OR, Summer 2025 Q5c OR

(a)
3 marks
Define handle and handle pruning.
(b)
4 marksAsked in 3 of 4 papers
Explain peephole optimization.

Also asked in Winter 2025 Q5c, Summer 2025 Q5c

(c)
7 marksAsked in 3 of 4 papers
Explain operator precedence parsing method with example.

Also asked in Summer 2025 Q3c, Summer 2024 Q3c OR

Q.5

14 Marks
(a)
3 marks
Differentiate LR(1) and LALR(1) parsers.
(b)
4 marksAsked in 2 of 4 papers
Explain Control Stack.

Also asked in Summer 2025 Q5a OR

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

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

(a)
3 marksAsked in 2 of 4 papers
What is flow graph? Give suitable example.

Also asked in Winter 2025 Q5a

(b)
4 marksAsked in 4 of 4 papers
Write a brief note on buffering techniques.

Also asked in Winter 2025 Q2c OR, Summer 2025 Q2a, Summer 2024 Q2c

(c)
7 marksAsked in 2 of 4 papers
Explain various code optimization methods with example.

Also asked in Summer 2024 Q5b

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 2026, 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