Question:

Match all items in Group 1 with correct options from those given in Group 2:
\[ \begin{array}{|c|c|} \hline Group 1 & Group 2
\hline P. \text{Intermediate representation} & 1. \text{Activation records}
Q. \text{Top-down parsing} & 2. \text{Code generation}
R. \text{Runtime environments} & 3. \text{Leftmost derivation}
S. \text{Register Allocation} & 4. \text{Graph colouring}
\hline \end{array} \]

Show Hint

In matching problems related to computer science, it helps to understand the context of each concept, especially in compiler design and optimization.
Updated On: Oct 7, 2025
  • P-4, Q-2, R-3, S-1
  • P-1, Q-3, R-1, S-4
  • P-2, Q-3, R-1, S-4
  • P-2, Q-1, R-4, S-3
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is C

Solution and Explanation

Let's analyze the given options: - P. Intermediate representation: In compiler design, intermediate representation is closely associated with Code generation. Intermediate code is used to optimize the code before it is converted to machine code. So, the correct match for P is 2. Code generation.
- Q. Top-down parsing: This type of parsing builds the parse tree from the root and is associated with Leftmost derivation. In top-down parsing, the leftmost non-terminal is expanded first. So, the correct match for Q is 3. Leftmost derivation.
- R. Runtime environments: Runtime environments are responsible for managing the execution of programs, which includes Activation records. These are used to keep track of function calls and local variables during execution. So, the correct match for R is 1. Activation records.
- S. Register Allocation: This involves Graph colouring because register allocation can be viewed as a graph colouring problem, where each variable is a node, and edges represent conflicts between variables that need to be assigned to different registers. So, the correct match for S is 4. Graph colouring.
Thus, the correct answer is \( \boxed{(c)} \).
Was this answer helpful?
0
0