Compiler Design - Online Test

Q1. In a compiler, keywords of a language are recognized during
Answer : Option C
Explaination / Solution:

Any identifier is also a token so it is recognized in lexical Analysis

Q2. One of the purposes of using intermediate code in compilers is to
Answer : Option C
Explaination / Solution:

Intermediate code is machine independent code which makes it easy to retarget the compiler to generate code for newer and different processors.

Q3.  Consider the following intermediate program in three address code
p = a - b
q = p *c 
p = u * v 
q = p + q
Which one of the following corresponds to a static single assignment form of the above code ?
Answer : Option B
Explaination / Solution:
No Explaination.