Quiz Space

Compiler Design · Quiz 1 · 19 Jul 2026 · May 2026 term

Question 12: A compiler performs lexical analysis and stores: every u…

Question 12

+3 marksOne correct option

A compiler performs lexical analysis and stores: every unique identifier in the Symbol Table,• every unique integer constant in the Constant Table.• Keywords, operators, delimiters, and punctuation symbols are not stored in either table.
Consider the following program.

How many entries will be present in the Symbol Table and the Constant Table, respectively?

  1. A

    Symbol Table = 5, Constant Table = 3

  2. B

    Symbol Table = 4, Constant Table = 2

  3. C

    Symbol Table = 5, Constant Table = 2

  4. D

    Symbol Table = 6, Constant Table = 2

Show answer

Correct answer

  • C

    Symbol Table = 5, Constant Table = 2

Question 12 of 16 in the IIT Madras BS Compiler Design (Compiler Design) Quiz 1 paper sat on 19 Jul 2026, in the May 2026 term (Compiler Design 16 Jul 26). It carries 3 marks.

More questions from this paper

  1. Q1Consider the following compiler phases and compiler tasks. Which one of the following correctly matches the compiler ph…
  2. Q2Which of the following describes a key programmatic difference between the functionality of an Interpreter and a Compil…
  3. Q3Figure question
  4. Q4Figure question
  5. Q5A compiler architecture uses a common Intermediate Representation (IR). Initially, it supports 6 source languages and 4…
  6. Q6Which of the following is NOT a responsibility of the lexical analyzer?
  7. Q7Figure question
  8. Q8Figure question
  9. Q9Which of the following statements correctly describes machine-independent optimizations?
  10. Q10Consider the following declarations: The compiler generates Three-Address Code (TAC) for the statement
  11. Q11Figure question
  12. Q13Assume that any undefined transition leads to a dead (trap) state, which is not shown in the table.\ Which of the follo…
  13. Q14A compiler back-end generates the following Three-Address Code (TAC) for an image enhancement algorithm.
  14. Q15Which of the following strings are accepted by the DFA?
  15. Q16Consider the following statements about Deterministic Finite Automata (DFA) and Nondeterministic Finite Automata (NFA).…