NPTEL Online Certification Courses Indian
Institute of Technology Kharagpur
Compiler Design
Assignment- Week 7
TYPE OF QUESTION:MCQ
Number ofquestions:10 Total mark: 10 X 1 = 10
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
Ans: c)
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
Ans: b)
3. Number of sections in YACC specification file is
a) 1
b) 2
c) 3
d) 4
Ans: c)
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
Ans: c)
5. Annotated parse tree means
a) Parse tree with attributes
b) Code generated
c) Correct parse tree
d) None of the given options
Ans: a)
6. For a rule "A B b C" the symbol C will be referred to by
a) $1
b) $2
c) $3
d) $4
Ans: c)
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 othrt options
Ans: d)
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
Ans: c)
9. Token attributes are returned by
a) yytext
b) yylen
c) yyval
d) yylval
Ans: d)
10. YYSTYPE defines the type for
a) Stack
b) Token
c) Input
d) Queue
Ans: a)
END of Assignment