B.TechSemester 52021-22Compiler DesignKCS-502

Compiler Design (KCS-502) - AKTU Question Paper 2021-22

B.Tech · Semester 5 · Free PDF Download

This is the official AKTU Compiler Design Previous Year Question Paper for B.Tech Semester 5, academic session 2021-22. Published by Dr. A.P.J. Abdul Kalam Technical University (AKTU/UPTU), Lucknow. Free PDF download — no login required.

Course:B.Tech
Semester:Semester 5
Session:2021-22
University:AKTU / UPTU

Rate this paper

Questions Asked in 2021-22

Compiler Design (KCS-502) — complete question paper

Section AAttempt all questions in brief. 2 x 10 = 20
  • a
    What is the difference between parse tree and abstract syntax tree?
  • b
    Explain the problems associated with top-down Parser
  • c
    What are the various errors that may appear in compilation process?
  • d
    What are the two types of attributes that are associated with a grammar symbol?
  • e
    Define the terms Language Translator and compiler
  • f
    What is hashing? Explain
  • g
    What is do you mean by left factoring the grammars? Explain
  • h
    Define left recursion. Is the following grammar left recursive? i. What is an ambiguous grammar? Give example. j. List down the conflicts during shift-reduce parsing
Section BAttempt any three of the following: 10 x 3 = 30
  • a
    Construct the LALR parsing table for the given grammar
  • b
    What is an activation record? Explain how it is related with runtime storage organization?
  • c
    Write the quadruple, triple, indirect triple for the following expression
  • d
    Discuss the following terms: i. Basic block ii. Next use information iii. Flow graph
  • e
    Construct predictive parse table for the following grammar
Section CAttempt any one part of the following: 10 x 1 = 10
  • a
    Construct the SLR parse table for the following Grammar
  • b
    Differentiate between stack allocation and heap allocation
  • a
    Write syntax directed definition for a given assignment statement
  • b
    What are the advantages of DAG? Explain the peephole optimization
  • a
    What do you understand by lexical phase error and syntactic er ror? Also suggest methods for recovery of errors
  • b
    Discuss how induction variables can be detected and elimina ted from the given intermediate code if t2<10 goto B2
  • a
    Test whether the grammar is LL(1) or not, and construct parsing table for it
  • b
    Distinguish between static scope and dynamic scope. Briefly explain access to non local names in static scope
  • a
    What are the various issues in design of code generator & code loop optimization?
  • b
    Generate the three address code for the following code fragment.
    while(a>b)
    {
    x=y+z;
    else
    x=y-z;
    }

Question text is extracted from the official AKTU question paper PDF above. Hindi translations are omitted — every question is printed in English in the original paper. Last verified: 2026-08-23.

Repeated Questions — KCS-502

Questions that appeared in more than one session, found by comparing 3 years of Compiler Design papers (2021-22, 2022-23, 2023-24)

2x

What are the two types of attributes that are associated with a grammar symbol?

Appeared in: 2021-22 · 2023-24

2x

Construct the LALR parsing table for the given grammar

Appeared in: 2021-22 · 2022-23

2x

Write the quadruple, triple, indirect triple for the following expression

Appeared in: 2021-22 · 2022-23

2x

Construct predictive parse table for the following grammar

Appeared in: 2021-22 · 2022-23

2x

Construct the SLR parse table for the following Grammar

Appeared in: 2021-22 · 2022-23

2x

Write syntax directed definition for a given assignment statement

Appeared in: 2021-22 · 2023-24