Time Left - 15:00 mins

GATE CS 2021 : Compiler Design Quiz 3 (App update required to attempt this test)

Attempt now to get your rank among 517 students!

Question 1

Consider the following CFG
SaAb|aBc|bAd|bBe
Ag
Bg
How many states are exist in DFA using LALR (1) constructions for the above grammar?

Question 2

If A α | α are two A-productions and the input begins with a non-empty string derived from a. Then in such a situation ______ is preferable

Question 3

Consider the following grammar for arithmetic expressions

E E + E | E * E | (E) | - E | id

We form a parse tree to derive id + id * id in two distinct ways. Then which of the following statements is correct about it?

Question 4

Which of the following remarks logically follows?

Question 5

S A | B

A a | b

B b | c

The grammar is

Question 6

Given grammar

S -> aAS {print 3}

S -> a {print 1}

A -> SbA {print 3}

A -> SS {print 2}

A -> ba {print 2}

For generating aabbaa what will be the output printed?

  • 517 attempts
  • 0 upvotes
  • 3 comments
Oct 12GATE & PSU CS

Posted by:

Harshita AgarwalHarshita AgarwalMember since Jul 2020
Share this quiz   |