GateAI
Intermediate Code Generation

GATE CSE 2014 Set 3 · Q17

MCQ1 markEasy

Time

One of the purposes of using intermediate code in compilers is to

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: C) increase the chances of reusing the machine-independent code optimizer in other compilers.

Intermediate Code Generation

Intermediate code serves as a machine-independent bridge between the front end (lexical analysis, parsing, semantic analysis) and the back end (code generation, target-specific optimizations) of a compiler.

Key benefits include:

  • Modularity and Portability: If there are MM source languages and NN target architectures, writing a separate compiler for each pair requires M×NM \times N compilers. With a common intermediate representation (IR), only MM front ends and NN back ends are needed (M+NM + N).

  • Reusability of Optimizers: Machine-independent optimizations (e.g., constant propagation, common subexpression elimination, dead code elimination, loop optimization) can be implemented once on the intermediate code and reused across different source languages and target architectures.

Therefore, option (C) is the correct answer.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Intermediate Code Generation previous year question is Q17 of the GATE CSE 2014 Set 3 paper. Find more GATE CSE PYQs on Intermediate Code Generation in Compiler Design, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Intermediate Code Generation PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Intermediate Code Generation in GATE CSE

Intermediate Code Generation has 14 GATE CSE PYQs across 12 papers from 2011 to 2025. 5 of them are 1-mark MCQs like this one, and it is the only one in GATE CSE 2014 Set 3.

How GATE tests Intermediate Code Generation

More from GATE CSE 2014 Set 3

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2014 Set 3 · Q17 · MCQ

One of the purposes of using intermediate code in compilers is to

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.