Gujarat Technological UniversityWinter 2024 Examination

GTU 3170701 Compiler Design (CD) Winter 2024 Paper Solution & PDF

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

Question 1

14 MarksMedium
(a)
Differentiate the following terms
1)interpreter and compiler
2)parse tree and syntax tree
3 Marks
(b)
Explain input buffering technique
4 Marks
(c)
Explain phases of compiler with an example
7 Marks

Question 2

14 MarksMedium
(a)
Explain lexeme, token and pattern with an example
3 Marks
(b)
Explain left recursion with an example
4 Marks
(c)

Construct transition diagram for relational operators. Explain roles of assembler, loader, linker and preprocessor

7 Marks
OR OPTION
(c)

Construct DFA without constructing NFA for the regular expression (a+b)*abb over input alphabets ∑ = {a,b}

7 Marks

Question 3

14 MarksMedium
(a)
Compare top down and bottom up parsing
3 Marks
(b)
Explain left factoring of grammar with an example
4 Marks
(c)
Design LL
1)parsing table for the following grammar E → E + T | T
2)T →T*F | F
3)F → (E) | id
7 Marks
OR OPTION
(a)
Explain operator precedence parsing
3 Marks
(b)
Explain ambiguous grammar with an example
4 Marks
(c)
Design LALR parsing table for the following grammar
S → CC C → cC | d
7 Marks

Question 4

14 MarksMedium
(a)
Explain flow graph with suitable example
3 Marks
(b)
Draw annotated tree for an arithmetic expression 9+5-2
4 Marks
(c)
Briefly explain error recovery strategies
7 Marks
OR OPTION
(a)
Explain symbol table
3 Marks
(b)
Write a short note on syntax directed definition
4 Marks
(c)
Explain Quadruples, Triple, Indirect Triple with an example
7 Marks

Question 5

14 MarksMedium
(a)
Explain stack allocation strategy
3 Marks
(b)
Explain various parameter passing methods
4 Marks
(c)
Explain peephole optimization technique
7 Marks
OR OPTION
(a)
Compare: static v/s dynamic memory allocation
3 Marks
(b)
Explain activation record
4 Marks
(c)
Explain any three code optimization techniques in detail
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) (Winter 2024, 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