NPTEL Compiler Design Week 4 Assignment Answers 2025
1. Words of a language constitute
a) Set of terminals
b) Set of non terminals
c) Set of both terminals and non terminals
d) None of the other options
Answer :- For Answers Click Here
2. The grammar (E →E + E | E * E | id) is
a) Ambiguous
b) Unambiguous
c) Partially ambiguous
d) None of the other options
Answer :-
3. Which of the following are always unambiguous
a) Producing one left-most and one right-most derivation
b) Producing one left-most but may be multiple right-most
c) Producing one right-most but may be multiple left-most
d) None of the other options
Answer :-
4. A language that admits only ambiguous grammar:
a) Inherent Ambiguous language
b) Inherent Unambiguous language
e) Context free language
d) Context Sensitive language
Answer :-
5. A grammar with production rules {A Ba | Cb, B → CA, C → c | s) contains
a) Left factor
b) Left recursion
c) Both left factor and left recursion
d) None of the other options
Answer :-
6. For the grammar rules (S → Aa | bB, A → c |&}, FIRST(S) is
a) (b, c)
b) {a, b}
c) (a,b, c)
d) (a,b,c,&)
Answer :- For Answers Click Here
7. The grammar (EE + T|T,T→T*F|F, F → id) is
a) Ambiguous
b) Unambiguous
c) Partially ambiguous
d) None of the other options
Answer :-
8. Derivation produced by a top-down parser is
a) Leftmost
b) Rightmost
c) Either leftmost and rightmost
d) None of the other options
Answer :-
9. For top-down parsing left recursion removal is
a) Mandatory
b) Desirable
c) Too complex
d) Not needed
Answer :-
10. A grammar is ambiguous if
a) It’s left most and right most derivations are different
b) More than one left most derivations exist
c) There is no left most derivation
d) There is no rightmost derivation
Answer :-
11. A predictive parser
(A) Needs backtracking
(B) Does not need backtracking
(C) May not terminate
(D) None of the other options
Answer :- For Answers Click Here