Compiler Design Week 4 Nptel Assignment Answers

Are you looking for NPTEL Compiler Design Week 4 Nptel Assignment Answers ? You’ve come to the right place! Access the most accurate answers at Progiez.


Compiler Design Week 4 Nptel Assignment Answers
Compiler Design Week 4 Nptel Assignment Answers

Compiler Design Week 4 Nptel Assignment Answers (Jan-Apr 2025)

Course Link: Click Here


Q1. 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

View Answer


Q2. The grammar {E → E + E | E * E | id} is

(a) Ambiguous
(b) Unambiguous
(c) Partially ambiguous
(d) None of the other options

View Answer


Q3. 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

View Answer


Q4. A regular language can be specified by

(a) Regular expression
(b) Regular grammar
(c) Both expression and regular grammar
(d) None of the other options

View Answer


Q5. A grammar with production rules { A → Ba | Cb, B → CA, C → c | ε } contains

(a) Left factor
(b) Left recursion
(c) Both left factor and left recursion
(d) None of the other options

View Answer


Q6. For the grammar rules {S → Aa | bB, A → c | ε}, FIRST(S) is

(a) {b, c}
(b) {a, b}
(c) {ab, c}
(d) {a, b, c, ε}

View Answer


Q7. The grammar {E → E + T | T, T → T * F | F, F → id} is

(a) Ambiguous
(b) Unambiguous
(c) Partially ambiguous
(d) None of the other options

See also  AI in Marketing Nptel Week 4 Assignment Answers

View Answer


Q8. Derivation produced by a top-down parser is

(a) Leftmost
(b) Rightmost
(c) Either leftmost or rightmost
(d) None of the other options

View Answer


Q9. For top-down parsing, left recursion removal is

(a) Mandatory
(b) Desirable
(c) Too complex
(d) Not needed

View Answer


Q10. A grammar is ambiguous if

(a) Its leftmost and rightmost derivations are different
(b) More than one leftmost derivation exists
(c) There is no leftmost derivation
(d) There is no rightmost derivation

View Answer


Q11. A predictive parser

(a) Needs backtracking
(b) Does not need backtracking
(c) May not terminate
(d) None of the other options

View Answer


Compiler Design Week 4 Nptel Assignment Answers (Jan-Apr 2025)

For answers to others Nptel courses, please refer to this link: NPTEL Assignment