GATE Compiler Design Full Mock Test SET-1

Questions 16-20 of 100

0% completed (0/100 answered)
Your score 0/100 0 answered
Correct 0 Incorrect 0 Unanswered 100 Accuracy 0%

Question 16

MCQ · Single Correct 1 mark

Consider the grammar S -> aSa | bSb | a | b | $\epsilon. What language does$ this grammar generate?

Answers for question 16

Question 17

MCQ · Single Correct 1 mark

A grammar G is ambiguous if there exists at least one string in L(G) that has:

Answers for question 17

Question 18

MCQ · Single Correct 1 mark

Eliminating immediate left recursion from rule A -> A alpha | beta yields which equivalent right-recursive rules?

Answers for question 18

Question 19

MCQ · Single Correct 1 mark

Given grammar S -> A B, A -> a A | $\epsilon, B -> b B | \epsilon$. What is FIRST(S)?

Answers for question 19

Question 20

MCQ · Single Correct 1 mark

For the grammar S -> A b, A -> c | $\epsilon, what$ is FOLLOW(A)?

Answers for question 20
Scroll to Top