1
GATE CSE 2015 Set 1
MCQ (Single Correct Answer)
+1
-0.3
Which one of the following is TRUE at any valid state in shift-reduce parsing?
A
Viable prefixes appear only at the bottom of the stack and not inside
B
Viable prefixes appear only at the top of the stack and not inside
C
The stack contains only a set of viable prefixes
D
The stack never contains viable prefixes
2
GATE CSE 2014 Set 2
MCQ (Single Correct Answer)
+1
-0.3

Consider the grammar defined by the following production rules, with two operators * and +

$$\eqalign{ & S \to T*P \cr & T \to U\,|\,T*U \cr & P \to Q + P\,|\,Q \cr & Q \to id \cr & U \to id \cr} $$

Which one of the following is TRUE?

A
+ is left associative, while * is right associative
B
+ is right associative, while * is left associative
C
Both + and * are right associative
D
Both + and * are left associative
3
GATE CSE 2013
MCQ (Single Correct Answer)
+1
-0.3
What is the maximum number of reduce moves that can be taken by a bottom-up parser for a grammar with no epsilon and unit-production ( i.e., of type $$A \to \varepsilon $$ and $$A \to a$$ ) to parse a string with n tokens?
A
$${n \over 2}$$
B
$$n - 1$$
C
$$2n - 1$$
D
$${2^n}$$
4
GATE CSE 2012
MCQ (Single Correct Answer)
+1
-0.3
Given the language L= { ab, aa, baa }, which of the following strings are in L* ?

1) abaabaaabaa
2) aaaabaaaa
3) baaaaabaaaab
4) baaaaabaa

A
1,2 and 3
B
2,3 and 4
C
1,2 and 4
D
1,3 and 4
GATE CSE Subjects
Software Engineering
Web Technologies
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12