Time Left - 15:00 mins

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

Attempt now to get your rank among 278 students!

Question 1

Which of the following are Lexemes?

Question 2

Consider the following statements:

S1 : Static allocation binding do not change at runtime.

S2 : Heap allocation allocates and de-allocates memory at runtime.

S3 : Non-local data such as global constants are known during compile time and placed in static areA.

Which of the above statements is/are correct?

Question 3

Which of the following is false?

Question 4

Match all items in Group 1 with correct options from those given in Group 2.

Question 5

Consider the following SDT (Syntax Directed Translations) -

S -> S & D { S.val = S1 .val + D.val }

S -> D { S.val = D.val }

D -> D * T { D.val = D1.val - T.val }

D -> T { D.val = T.val }

T -> no { T.val = Num }

Where val is the synthesized attribute in the SDT. Then what will be the output of the following expression ?

5 & 9 * 7 * 1 & 6 * 8 & 2 * 5 * 4 & 3

Question 6

Consider the following SDT :

S TR

R {printf(*)} + T {printf(*)} R {printf(+)}

T num {printf(*)}

R {printf(+)}

How many + will be printed for the input 9 + 5 + 2 + 7 _____________.

  • 278 attempts
  • 0 upvotes
  • 2 comments
Jun 5GATE & PSU CS

Posted by:

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