Time Left - 15:00 mins

GATE CS 2022: Compiler Design-2

Attempt now to get your rank among 335 students!

Question 1

Which of the following is the machine dependent phase of compiler?

Question 2

Which of the following code can produce lexical error?

Question 3

Consider the below statements :
S1 : The front end of compiler consists Lexical analyzer , Syntax analyzer and semantic analyzer.
S2 : Target code generator is known as the back-end of compiler.
S3 : Code optimizer is middle end of compiler and is a optional phase in compiler.
Which option is correct ?

Question 4

Consider the following grammar for arithmetic expressions

X X+Z|Z

Z Z*Y|Y

Y (X)id

Then after eliminating the immediate left recursions we get

Question 5

If A->ɑ|ε is LL (1) and ɑ ε then which of the following is TRUE?

Question 6

Consider the following SSA code:

t1 = a – b;

t2 = t1 * c;

t3 = a – b;

t4 = t3 / t1

How many minimum variables required in equivalent three address code for the above static single assignment code?

  • 335 attempts
  • 1 upvote
  • 4 comments
Jul 21GATE & PSU CS

Posted by:

Priya UpadhyayPriya UpadhyayMember since Sep 2020
Priya Upadhyay
Share this quiz   |