Compiler Design | NPTEL 2023 | Week 7 Assignment Solutions

This set of MCQ(multiple choice questions) focuses on the Compiler Design NPTEL 2023 Week 7 Assignment Solutions.

Course layout

Answers COMING SOON! Kindly Wait!

Week 1: Assignment answers
Week 2: Assignment answers
Week 3: Assignment answers
Week 4: Assignment answers
Week 5: Assignment answers
Week 6: Assignment answers
Week 7: Assignment answers
Week 8: Assignment answers
Week 9: Assignment answers
Week 10: Assignment answers
Week 11: Assignment answers
Week 12: Assignment answers

NOTE: You can check your answer immediately by clicking show answer button. This set of “Compiler Design NPTEL 2023 Week 7 Assignment Solution” contains 10 questions.

Now, start attempting the quiz.

Compiler Design NPTEL 2023 Week 7 Assignment Solutions

Q1. What is aided by syntax-directed translation?

a) Building the parse tree
b) Look for any unfamiliar symbols in the input
c) Verify the input’s accuracy in terms of syntax
d) None of the alternative choices

Answer: a)

Q2. What does annotated parse trees refer?

a) Tree parsing using attributes
b) generated code
c) accurate parse tree
d) None of the available choices

Answer: a)

Q3. Section $$ of the YACC Regulations refers to.

a) The first symbol from the right
b) On the right, the final symbol
c) On the left, there is a symbol
d) Either of them

Answer: c)

Q4. How many sections are there in the YACC specification file?

a) 4
b) 3
c) 1
d) 2

Answer: b)

Q5. What is the prefix expression of 7*8+10?

a) + * 7 8 10
b) 7 8 * 10 +
c) 7 * 8 + 10
d) * + 7 8 10

Answer: a)

Compiler Design NPTEL week 7 Assignment Solutions

Q6. The reference to the symbol Z for the rule “D –> XcZ” is?

a) $3
b) $1
c) $$
d) $2

Answer: a)

Q7. The postfix expression for 9+7*11 is?

a) 9 7 11 + *
b) 9 7 11 * +
c) * 9 7 11 +
d) + * 9 7 11

Answer: b)

Compiler Design NPTEL week 7 Assignment Solutions

Q8. By YACC, files are created that are?

a) y.parse.c, y.tab.h
b) y.tab.c, y.token.h
c) y.ta.c, y.tab.h
d) None of the alternative choices.

Answer: c)

Q9. What returns the token attributes?

a) yylval
b) yyval
c) yytext
d) yylen

Answer: a)

Q10. The grammar X -> yXy|fX|d is?

a) LL(1) but not LR(1)
b) LR(1) but not LL(1)
c) Both LL(1) and LR(1)
d) Both LL(1) LR(1) are false

Answer: c)

Compiler Design NPTEL week 7 Assignment Solutions

>> Next- Compiler Design Week 8 Assignment Solutions


DISCLAIMER: Use these answers only for the reference purpose. Quizermania doesn't claim these answers to be 100% correct. So, make sure you submit your assignments on the basis of your knowledge.

For discussion about any question, join the below comment section. And get the solution of your query. Also, try to share your thoughts about the topics covered in this particular quiz.

Leave a Comment

Your email address will not be published. Required fields are marked *