Compiler Design PYQ 2024-25 AKTU Question Paper

AKTU · BTECH · Semester 6 · Compiler Design · Session 2024-25 · PYQ

AKTU Compiler Design previous year question paper 2024-25 for B.Tech Semester 6. Covers Compiler Foundations, Lexical Analysis and Syntactic Specification…

Open the interactive reader to study this resource on AcademicArk.

Compiler Design AKTU syllabus

  1. Unit 1: Compiler Foundations, Lexical Analysis and Syntactic Specification
  2. Unit 2: Basic Parsing Techniques and Automatic Construction of Efficient Parsers
  3. Unit 3: Syntax-Directed Translation and Intermediate Code
  4. Unit 4: Symbol Tables, Run-Time Administration and Error Recovery
  5. Unit 5: Code Generation and Code Optimization

Questions in Compiler Design AKTU PYQ 2024-25

  1. Q1a. Differentiate between phases and passes of a compiler. (2 marks, 2024-25)
  2. Q1b. State any two differences between top-down and bottom-up parsing. (2 marks, 2024-25)
  3. Q1c. Mention the difference between inherited and synthesized attributes. (2 marks, 2024-25)
  4. Q1d. Explain the role of a hash table in implementing a symbol table. (2 marks, 2024-25)
  5. Q1e. What is the Finite State Machines (FSM)? Design a FSM that accepts all strings of a and b containing even number of a’s and odd number of b’s. (2 marks, 2024-25)
  6. Q1f. Write a note on Lexical and Syntactic structure of a programming language. (2 marks, 2024-25)
  7. Q1g. What is machine-independent code optimization? (2 marks, 2024-25)
  8. Q2a. Explain in detail the process of compilation. Illustrate the output of each phase of compilation of the input “a = (b + c)*(b + c)* 2”. (7 marks, 2024-25)
  9. Q2b. Using rightmost derivations or the derivation trees show that the grammar with following production rules is ambiguous S → aSbS | bSaS | ε (7 marks, 2024-25)
  10. Q2c. Analyze the role of symbol tables in different phases of compilation. How does symbol table interact with lexical, syntax, and semantic analyzers? (7 marks, 2024-25)
  11. Q2d. Given the grammar: S → Aa | bAc | Bc | bBa A → d B → d Construct the SLR parsing table and determine whether any conflicts occur. (7 marks, 2024-25)
  12. Q2e. Semantic errors are often difficult to detect. Explain different types of semantic errors with examples and how a compiler detects them during semantic analysis. (7 marks, 2024-25)
  13. Q3a. Construct LL(1) parsing table for the following grammar S → aB | aC | Sd | Se B → bBc | f C → g (7 marks, 2024-25)
  14. Q3b. Explain the major design issues in code generation. How do these issues impact the performance of a compiler? (7 marks, 2024-25)
  15. Q4a. Parse the input string (a,(a, a)) using shift reduce parser S → (L) | a L → L, S | S (7 marks, 2024-25)
  16. Q4b. Discuss the optimization techniques used at the basic block level. Explain with an example how a basic block can be optimized. (7 marks, 2024-25)
  17. Q5a. Write Quadruple, Triple, and three address code for the expression (a/b)*(a+b) - (a*b)/d (7 marks, 2024-25)
  18. Q5b. Give various types of three address statements used for different programming language constructs such as assignment, jump, procedure calls, array statements etc. (7 marks, 2024-25)
  19. Q6a. What are Static and Dynamic Scope Rules? How are the activation records used in implementation of recursive calls of a procedure/function. (7 marks, 2024-25)
  20. Q6b. Generate a three address code for the following code segment c = 0; while (c<5) { if (a < b) then x++; else goto p; c++; } p: printf(”Not Done”); (7 marks, 2024-25)
  21. Q7a. What are the principle sources of optimization of code? How the DAG is used in common sub-expression elimination? Discuss in details. (7 marks, 2024-25)
  22. Q7b. Give a classification of various errors and discuss each class of errors with examples. (7 marks, 2024-25)

AKTU paper codes: BCS602

Compiler Design previous year papers

More Compiler Design resources

Browse all notes · Semester 6 notes · Compiler Design notes