Time Left - 15:00 mins

GATE CS 2022 : Compiler Design-1 (App update required to attempt this test)

Attempt now to get your rank among 282 students!

Question 1

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

Question 2

For the below SDT, what will be the output for input string 7 # 5 & 4?

E E # T {E.val = E.val * T.val}

| T {E.val = T.val}

T T & F {T.val = T.val + F.val}

| F {T.val = F.val}

F num {F.val = num.val}

Question 3

Lexical error is _____.

Question 4

Which of the following is not a functionality of C compiler?

Question 5

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?

Question 6

Consider the following code:

x==y&2||z++!=3;

How many tokens are identified by lexical phase while scanning the above code?

  • 282 attempts
  • 0 upvotes
  • 2 comments
Jun 2GATE & PSU CS