Retrieving academic index assets...
Makaut
HomePYQsTests
Pricing
Sign Up
Makaut

The premier academic archive for MAKAUT students, providing curated previous year questions, solutions, and official syllabus resources.

Get the Mobile App
GET IT ONGoogle Play
Download on theApp Store
Download from Indus App Store
Platform
  • Home
  • PYQs
  • Question Papers
  • Viva Questions
  • Important Questions
  • Syllabus
  • Academic Tools
  • Pricing
  • Blog
Guidelines
  • Disclaimer
  • Community Guidelines
Company
  • About
  • Contact
  • FAQ
Legal
  • Privacy Policy
  • Terms of Service
  • Refund Policy
  • Cookie Policy
  • Subscription Policy
© 2026 MAKAUT Study Dev Hub. All rights reserved.
Platform version: v1.0.0
Home/PYQs/Sem 5/Compiler Design/2024
PCC-CS501Sem 5 • 2024 Exam
Full Marks: 70 • Time: 3 Hours

MAKAUT Compiler Design 2024 Question Paper

Official theoretical question paper for Compiler Design (PCC-CS501) conducted by Maulana Abul Kalam Azad University of Technology. All questions from Groups A, B, and C are reproduced below with marks weightings.

Download MAKAUT Compiler Design 2024 Question Paper PDFView All PCC-CS501 Papers

AGroup A — Objective / Multiple Choice Questions

10 × 1 = 10 Marks
1(i)[1 Mark]

If w is a string and |w| = n then the number of prefixes of w are ______.

1(ii)[1 Mark]

Given two DFA's M1 and M2. They are equivalent if ______.

1(iii)[1 Mark]

YACC is a ______.

1(iv)[1 Mark]

The number of subsequences of a string w of length n are ______.

1(v)[1 Mark]

______ phase of compilation process is an optional phase.

1(vi)[1 Mark]

LEX is a ______.

1(vii)[1 Mark]

Constant folding means ______.

1(viii)[1 Mark]

A block kills an expression x op y iff ______.

1(ix)[1 Mark]

Code generator uses ______ function to determine the status of available registers and the location of name values.

1(x)[1 Mark]

The intersection of a regular language and a context free language is ______.

1(xi)[1 Mark]

A left recursive grammar cannot be LL(1). (True/False)

a) True
b) False
1(xii)[1 Mark]

If G=(V, T, P, S) is a context free grammar. Then L(G) will be infinite iff ______.

BGroup B — Short Answer Conceptual Questions

3 × 5 = 15 Marks
2[5 Marks]

Describe the language processing system with a diagram.

3[5 Marks]

Represent the following sets by regular expression: a. {0,1,2} b. The set of all strings over {a,b} which consists of all words with exactly two a's c. The set of all strings over {a,b} which consists of all words that contain aaa or bbb as substring

4[5 Marks]

What is a left recursive grammar? Remove left recursion from the grammar G:{S->Aa | b, A->Ac | Sd | ε}.

5[5 Marks]

What do you mean by Syntax directed translation? Compare and contrast between S-Attributed SDT and L-attributed SDT.

6[5 Marks]

Why left recursive grammar is not suitable for predictive parsers? Remove left recursion from the grammar G:{E->E+T | T, T->T*F | F, F->F* | a | b}

CGroup C — Long Answer Analytical & Numerical Questions

3 × 15 = 45 Marks
7[15 Marks]

Consider the following augmented grammar: S'->S S->CC C->c C C->d a) Construct the Set of LR(1) Items for the above grammar b) Construct an LALR parsing table for the same c) Show which states LA LR parser could be combined and why d) Construct the corresponding CLR parsing table

8[15 Marks]

a) What do you mean by Peephole Optimization? b) Explain with example (i) Constant Folding (ii) Common sub-expression elimination (iii) Loop unrolling (iv) Loop jamming c) What do you mean by redundant Load Store Statement?

9[15 Marks]

Generate three address codes for I. indexed assignments II. pointer assignments III. conditional statements

10[15 Marks]

Consider the following three address code segment: I. prod:=0 II. i:=1 III. t1:=4*i IV. t2:=addr(A)-4 V. t3:=t2[t1] VI. t4:= addr(B)-4 VII. t5:=t4[t1] VIII. t6:=t3*t5 IX. prod:=prod + t6 X. i:=i+1 XI. if i<=20 goto(3) I. Find the basic blocks and flow graph of the above sequence. II. Optimize the code sequence by applying function preserving transformation and loop optimization techniques.

11[15 Marks]

a) Discuss the following parameter passing techniques with suitable example: i. Call by value ii. Call by reference iii. Call by name b) Discuss the following storage allocation strategies: i. Stack allocation ii. Heap allocation c) Show the activation records and display just after the procedure call. program main(); procedure p; function q(a: integer) : integer; begin if (a=) then q:=1; else q:= a+q(a-1); end begin q(3); end; begin p; end;

← 2023 Question Paper2025 Question Paper →