Compiler Design Week 5 Nptel Assignment Answers

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


Compiler Design Week 5 Nptel Assignment Answers
Compiler Design Week 5 Nptel Assignment Answers

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

Course Link: Click Here


  1. In shift-reduce parsing, handle is at
    a. Top of the stack
    b. Bottom of the stack
    c. Anywhere in the stack
    d. Nowhere in the stack

View Answer


  1. Which of the following conflicts is not possible in shift-reduce parsing?
    a. Reduce-reduce conflict
    b. Shift-reduce conflict
    c. Shift-shift conflict
    d. None of the other options

View Answer


  1. Which one of the following is true at any valid state in shift-reduce parsing?
    a. At the bottom we find the prefixes
    b. None of the mentioned
    c. Stack contains only viable prefixes
    d. Stack consists of viable prefixes

View Answer


  1. For the grammar
    S → AB | C
    A → bA | a
    B → abbS | bS | ε
    C → bC | ε

Follow(A) is
a) a, $
b) a, b, $
c) a, b
d) b, $

View Answer


  1. Shift-reduce parsers are
    a. Top-down Parser
    b. Bottom-up Parser
    c. May be top-down or bottom-up
    d. None of the mentioned

View Answer


  1. Shift-reduce parsers are
    a. Top-down Parser
    b. Bottom-up Parser
    c. May be top-down or bottom-up
    d. None of the mentioned

View Answer


  1. In Operator Precedence parsing, handle is
    a. Before
    b. After
    c. Between and
    d. None of the other options

View Answer


  1. By considering the rule B → abbS, which of the precedence relations between a and b can be inferred?
    a) a = b only
    b) a = b and b = b
    c) b = a and a = b
    d) b = a and b = b

View Answer


  1. An operator-precedence parser is a
    a. Shift-reduce parser
    b. Bottom-up parser
    c. Parser constructing derivation in the reverse
    d. All the other options

View Answer


  1. Bottom-up parsing involves
    a. Shift-reduce
    b. Handle pruning
    c. None of the mentioned
    d. Both shift-reduce and handle pruning

View Answer


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

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