Home › AKTU PYQ › Compiler Design › PYQ Questions › Unit 3

Compiler Design Unit 3 – Syntax-Directed Translation and Intermediate Code: AKTU previous year questions

12 AKTU questions from Unit 3 (Syntax-Directed Translation and Intermediate Code) asked in 2024–2026, tagged by marks, year and topic. In short: about 29 marks of every paper come from this unit; the most asked topic is Quadruples and Triples (11 times); 3 questions came back in a later year. The latest ones are listed below; on the page you can filter them by 2-mark or long questions, topic and repeats.

Unit 3 previous year questions

  • Define Boolean expression translation. (2 marks, 2026, Translation of Boolean Expressions)
  • Why are quadruples preferred over triples in an optimizing compiler? (2 marks, 2026, Quadruples and Triples)
  • Describe translation schemes for assignment statements and arithmetic expressions. (7 marks, 2026, Translation of Assignment Statements)
  • Explain three-address code representation and discuss quadruples, triples, and indirect triples. (7 marks, 2026, Three-Address Code)
  • Generate postfix notation and three-address code for : (a+b)∗(c−d)+e (7 marks, 2026, Intermediate Code)
  • Write Quadruple, Triple, and three address code for the expression (a/b)*(a+b) - (a*b)/d (7 marks, 2025, Quadruples and Triples)
  • Give various types of three address statements used for different programming language constructs such as assignment, jump, procedure calls, array statements etc. (7 marks, 2025, Three-Address Code)
  • 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, 2025, Translation of Statements That Alter the Flow of Control)
  • Differentiate Parse tree and Syntax tree with an example. (2 marks, 2024, Parse Trees and Syntax Trees)
  • Define the syntax directed definition (SDD) with suitable and simple example. (2 marks, 2024, Syntax-Directed Translation Schemes)
  • Define syntax-directed translation schemes. (2 marks, 2024, Syntax-Directed Translation Schemes)
  • Construct the syntax tree for the following expression: (a*c)+b*((c*a)+d) (2 marks, 2024, Parse Trees and Syntax Trees)

Most asked Unit 3 topics

  • Quadruples and Triples – asked 11 times
  • Syntax-Directed Translation Schemes – asked 7 times
  • Intermediate Code – asked 7 times

Unit 3 question pattern

  • 2-mark questions: 6 asked in 2024–2026
  • 7-mark questions: 6 asked in 2024–2026
  • About 29 marks from Unit 3 in every paper
  • 3 questions were asked again in a later year

Unit 3 questions year by year

  • 2026: 5 Unit 3 questions asked (25 marks across that year's papers)
  • 2025: 3 Unit 3 questions asked (21 marks across that year's papers)
  • 2024: 4 Unit 3 questions asked (8 marks across that year's papers)