B.TechSemester 62024-25Compiler DesignBCS602

Compiler Design (BCS602) - AKTU Question Paper 2024-25

B.Tech · Semester 6 · Free PDF Download

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

Course:B.Tech
Semester:Semester 6
Session:2024-25
University:AKTU / UPTU

Rate this paper

Questions Asked in 2024-25

Compiler Design (BCS602) — extracted question text · 70 marks · 3 Hours

Section AAttempt all questions in brief. 02x7=14
  • a
    Differentiate between phases and passes of a compiler
  • b
    State any two differences between top-down and bottom-up parsing
  • c
    Mention the difference between inherited and synthesized attributes. d_ Explain the role of a hash table in implementing a symbol table
  • e
    What is the Finite State Machines (FSM)? Design a FSM that accepts all strings of aand b containing even number of a’s and odd number of b’s
  • f
    Write a note on Lexical and Syntactic structure of a programming language
  • g
    What is machine-independent code optimization?
Section BAttempt any three of the following: 07x3=21
  • a
    Explain in detail the process of compilation. Illustratethe output of each phase of compilation of the input “a= (b+ 0*(b+ Q*« 2”
  • b
    Using rightmost derivations or the derivation trees show that the grammar with following production rules is ambiguous S —» aSbS bSaS} c
  • c
    Analyze the role of symbol tables in different phases of compilation. How does symbol table interact with lexical, syntax, and semantic analyzers?
  • d
    Given the grammar: S — Aa bAc Bc bBa Construct the SLR parsing table and determine whether anyconflicts occur
  • e
    Semantic errors are often difficult to detect. Explain different,types of semantic errors with examples and how a compiler detects them.during semantic analysis
Section CAttempt any one part of the following: 07x 1=07
  • a
    Construct LL(1) parsing table for the following grammar B —-»> bBc f
  • b
    Explain the major design issues in code generation. How do these issues impact the performance of a compiler?
  • a
    Parse the input string (a,(a, a)) using shift reduce parser
  • b
    Discuss the optimization techniques used at the basic block level. Explain with an example how a basic block can be optimized
  • a
    Write Quadruple, Triple, and three address code for the expression (a/b)*(atb) - (a*b)/d
  • b
    Give various types of three address statements used for different programming language constructs such as assignment, jump, procedure calls, array statements Paper id: 250631 Roll No: __ ete
  • a
    What are Static and Dynamic Scope Rules? How are the activation records used in implementation of recursive calls of a procedure/function
  • b
    Generate a three address code for the following code segment
    c=0;
    while (c<5)
    if (a < b) then
    xt;
    else
    goto p;
    cH;
    }
    p: printf?’Not Done”)
  • a
    What are the principle sources of optimization\of code? How the DAG is used in common sub-expression elimination? Discuss in details
  • b
    Give a classification of various errors and\discuss each class of errors with examples

Question text is extracted from the official AKTU question paper PDF above. Check the original PDF for equations, diagrams and complete wording. Extracted: 2026-08-23.