Compiler Design Week 7 Nptel Assignment Answers

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


Compiler Design Week 7 Nptel Assignment Answers
Compiler Design Week 7 Nptel Assignment Answers

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

Course Link: Click Here


1) Full form of YACC is

a) Yes Another Compiler Constructor
b) Yet Another Compiler Constructor
c) Yet Another Compiler Compiler
d) Neither of the other options

View Answer


2) File produced by YACC and used by Lex is SLR

a) y.tab.c
b) y.tab.h
c) y.parse.c
d) y.parse.h

View Answer


3) Number of sections in YACC specification file is

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

View Answer


4) In YACC rules section $$ refers to

a) First symbol on right hand side
b) Last symbol on right hand side
c) Symbol on the left hand side
d) Any of them

View Answer


5) Annotated parse tree means

a) Parse tree with attributes
b) Code generated
c) Correct parse tree
d) None of the given options

View Answer


6) For a rule “A B b C” the symbol C will be referred to by

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

View Answer


7) Syntax directed translation helps in

a) Creating parse tree
b) Check syntactical correctness of input
c) Check if the input has foreign symbols
d) None of the other options

View Answer


8) Files generated by YACC are

a) y.tab.c, y.token.h
b) y.parse.c, y.tab.h
c) y.tab.c, y.tab.h
d) None of the other options

View Answer


9) Token attributes are returned by

See also  Compiler Design Week 6 Nptel Assignment Answers

a) yytext
b) Wlen
c) wval
d) yylval

View Answer


10) YYSTYPE defines the type for

a) Stack
b) Token
c) Input
d) Queue

View Answer


11) Which of the following statements about YACC is true?

a) YACC generates a lexical analyzer
b) YACC is used for syntax analysis
c) YACC does not support semantic actions
d) YACC does not require grammar rules

View Answer


12) Which of the following correctly describes the role of yyparse() in YACC?

a) It performs lexical analysis
b) It calls the scanner (Lex) and parses tokens
c) It generates the final executable code
d) It stores token attributes

View Answer

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

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