Gujarat Technological UniversitySummer 2023 examination

GTU 3170701 Compiler Design (CD) Summer 2023 Question Paper & PDF

B.E. · Computer Engineering · Semester 7 · Subject code 3170701
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
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. 4 more are types of question GTU sets again with new data. Each is marked below with the years it appeared.See all 39 repeated 3170701 questions, most asked first

Q.1

14 Marks
(a)
3 marksAsked in 2 of 7 papers
Define lexemes, patterns and tokens

Also asked in Winter 2024 Q2a

(b)
4 marksSame type asked in 4 of 7 papers
Write a regular definition for:
1The language of all strings containing at least one 0 and at least one 1.
2The language of all strings that do not end with 01.
3The language of all strings containing 0’s and 1’s both are even.
4The language of all strings which are starting with 1 and ending with 0.

Also asked in Summer 2026 Q2b, Summer 2025 Q2b, Winter 2023 Q2a

(c)
7 marksAsked in 5 of 7 papers
Explain phases of compilers with suitable example.

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

Q.2

14 Marks
(a)
3 marksAsked in 4 of 7 papers
Differentiate ambiguous and unambiguous grammar.

Also asked in Summer 2026 Q3a, Winter 2025 Q3b, Winter 2024 Q3b OR

(b)
4 marksAsked in 4 of 7 papers
Write a short note on input buffering techniques.

Also asked in Summer 2026 Q2a, Winter 2024 Q1b, Summer 2024 Q1b

(c)
7 marksSame type asked in 5 of 7 papers

Construct a DFA for a given regular expression using syntax tree with firstpos, lastpos and followpos function. (a|b)*a

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

(c)
7 marksSame type asked in 3 of 7 papers

Construct the NFA for following regular expression using Thompson’s construction. Apply subset construction method to convert into DFA. (a+b)*abb#

Also asked in Summer 2026 Q2c, Summer 2025 Q2c OR

Q.3

14 Marks
(a)
3 marks
Give the translation scheme that convert infix to postfix notation.
(b)
4 marks
Define: Left Recursive Grammar. Check Following grammar is left
recursive or not, if yes, remove left recursive from it.
A → ABd / Aa / a
B → Be / b
(c)
7 marksAsked in 2 of 7 papers
Construct an SLR Parsing table for the following grammar.
S → Aa | bAc | bBa
A → d
B → d

Also asked in Winter 2023 Q3c

(a)
3 marksAsked in 4 of 7 papers
Explain shift reduce parsing technique in brief.

Also asked in Summer 2026 Q3b, Summer 2024 Q4c OR, Winter 2023 Q3a

(b)
4 marksAsked in 4 of 7 papers
Differentiate top down parsing and bottom up parsing.

Also asked in Summer 2026 Q3a OR, Summer 2025 Q5a OR, Winter 2024 Q3a

(c)
7 marksAsked in 2 of 7 papers
Show that the following grammar
S → AaAb | BbBa
A → ϵ
B → ϵ
is LL(1) but not SLR(1).

Also asked in Summer 2025 Q3c

Q.4

14 Marks
(a)
3 marksAsked in 6 of 7 papers
Write a short note on activation record.

Also asked in Summer 2026 Q4a OR, Winter 2025 Q4b OR, Winter 2024 Q5b OR, Summer 2024 Q5a, Winter 2023 Q4a

(b)
4 marksAsked in 4 of 7 papers
Explain Symbol table management in brief.

Also asked in Winter 2025 Q4a, Summer 2025 Q5b OR, Winter 2024 Q4a OR

(c)
7 marksAsked in 2 of 7 papers
List and explain various storage allocation strategies.

Also asked in Winter 2025 Q5c OR

(a)
3 marksAsked in 2 of 7 papers
What do you mean by dangling references?

Also asked in Summer 2025 Q5a

(b)
4 marksAsked in 6 of 7 papers
Explain Error Recovery Strategies in Compiler in brief.

Also asked in Summer 2026 Q4b, Winter 2025 Q4c, Summer 2025 Q4b, Winter 2024 Q4c, Summer 2024 Q2b

(c)
7 marks

Write three address code for a = b*-c + b*-c

Q.5

14 Marks
(a)
3 marks

Translate the arithmetic expression (a + b) * (c + d) into

1Syntax tree
2Postfix notation
(b)
4 marksAsked in 3 of 7 papers
Compare: Static v/s Dynamic Memory Allocation

Also asked in Summer 2026 Q5a OR, Winter 2024 Q5a OR

(c)
7 marksAsked in 4 of 7 papers
Explain various code optimization techniques.

Also asked in Winter 2024 Q5c OR, Summer 2024 Q5c, Winter 2023 Q5c

(a)
3 marksSame type asked in 2 of 7 papers
Construct a DAG for the following expression:

a = b*-c + b*-c

Also asked in Summer 2025 Q4a OR

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

Also asked in Summer 2026 Q5b OR, Summer 2025 Q4b OR, Winter 2024 Q5b, Summer 2024 Q4a OR

(c)
7 marksAsked in 5 of 7 papers
Explain various issues in design of code generator.

Also asked in Summer 2026 Q5c, Winter 2025 Q5c, Summer 2024 Q5c OR, Winter 2023 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 for Compiler Design (CD) (Summer 2023, 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