Time Left - 12:00 mins

Compiler Design : Nuclear Quiz 3

Attempt now to get your rank among 371 students!

Question 1

Which of the following are Lexemes?

Question 2

GOTO(A→α·Xβ,X) is:

Question 3

Calculate the first and follow functions for the given grammar:
S → aBDh

B → cC

C → bC / ∈

D → EF

E → g / ∈

F → f / ∈

Which of the following is true?

Question 4

Consider the given below statements about SDT:

P1: If a definition is S-attributed, then it is also L-attributed

P2: If a definition is L- attributed, then it is also S- attributed

Select the correct option?

Question 5

A three-address code has _________ address locations to calculate the expression.

Question 6

The method which merges the bodies of two loops is

Question 7

Which of the following is not a machine-independent code optimization technique?

Question 8

Consider the grammar G whose SLR parser has n1 states and LALR parser has n2 states. What is the relation between n1 and n2?

Question 9

Consider the following grammar

P QR

Q +P | *R | t |

R id

In the predictive parser table M of the grammar the entries M[P, $], M[P, id], M[Q, $] and M[Q, id] are respectively.
Note : { } represents blank entry.

Question 10

Which of the following statements is / are false?

S1 : LR(0) grammar and SLR(1) grammar are equivalent

S2 : LR(1)  grammar are subset of LALR(1) grammars.

  • 371 attempts
  • 0 upvotes
  • 3 comments
Aug 5GATE & PSU CS