The Gateway to Computer Science Excellence
+29 votes

Generation of intermediate code based on an abstract machine model is useful in compilers because

  1. it makes implementation of lexical analysis and syntax analysis easier

  2. syntax-directed translations can be written for intermediate code generation

  3. it enhances the portability of the front end of the compiler

  4. it is not possible to generate code for real machines directly from high level language programs

in Compiler Design by Veteran (52.2k points) | 4.1k views

$It\ enhances\ the\ portability\ of\ the\ front\ end\ of\ the\ compiler\ $

Ans: C

1 Answer

+33 votes
Best answer
C. stating the actual use of the Intermediate Code.

Also optimizations can be done on intermediate code enhancing the portability of the optimizer.
by Boss (19.9k points)
selected by
nothing else other than option C makes sense for the answers. therefore C is correct.

the answer is A.... it makes implementation of lexical analysis and syntax analysis easier and not c

Your answer matches with Made easy solution but in my view, the answer should be C because when we generate intermediate code it is independent of machine so we can easily implement the same code in different machines without performing the analysis phase of compiler again and again.

P.S: If u have any proper explanation for the answer then please let us know.

@arjun sir whats wrong wid option B  .  just see the point no 8  of this link

point 8 is right that SDT is used for intermediate code generation . but that is not the reason why intermediate code is important
actually intermediate code implemented in back end ...then here why front end specify
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,647 questions
56,461 answers
100,242 users