CS8602 Compiler Design UNIT 3 MCQ
CS8602 Compiler Design UNIT 3 MCQ
com
ChettinadTech Dept of CSE
Answer: (C)
2. Suppose One of the Operand is String and other is Integer then parser does not throw error as it
only checks whether there are two operands associated with ‘+’ or not.
A. True
B. False
Answer: (A)
Answer: (A)
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
www.edubuzz360.com
ChettinadTech Dept of CSE
Answer: (C)
Answer: (C)
Answer: (A)
Answer: (B)
8. A synthesized attribute is an attribute whose value at a parse tree node depends on __________
A. Attributes at the siblings only
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
www.edubuzz360.com
ChettinadTech Dept of CSE
Answer: (C)
Answer: (C)
A. Yacc
B. Lex
C. Symbol Table
D. Type Checking
Answer: (D)
Answer: (D)
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
www.edubuzz360.com
ChettinadTech Dept of CSE
Answer: (C)
A. Root
B. Interior nodes
C. Leaves
D. Nodes
Answer: (B)
14. In which of the following tree, the leaf indicates the operand, and the interior node represents the
operator.
A. Syntax tree
B. Parser tree
C. Structured tree
D. Sematic tree
Answer: (A)
A. 3- address
B. 2-address
C. address
D. Intermediate code
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
www.edubuzz360.com
ChettinadTech Dept of CSE
Answer: (A)
A. Parse table
B. Input
C. Output
D. Input-Output
Answer: (D)
A. gen_code()
B. emit()
C. new_label()
D. lookup()
Answer: (C)
A. gen_code()
B. emit()
C. new_label()
D. lookup()
Answer: (B)
19. Which function is used to check whether the identifier is in symbol table?
A. gen_code()
B. emit()
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
www.edubuzz360.com
ChettinadTech Dept of CSE
C. new_label()
D. lookup()
Answer: (D)
A. gen_code()
B. emit()
C. new_temp()
D. lookup()
Answer: (C)
21. Back patching Algorithms perform only two operations such as mergelist() and backpatch()
A. True
B. False
Answer: (B)
A. makelist (i) – creates a new list containing only i and returns a pointer to the list it has made.
B. Merge (i, j) – concatenates the lists pointed to by i and j, and returns a pointer to the
concatenated list.
C. Backpatch (p, i) – inserts i as the target label for each of the statements on the list pointed to
by p.
Answer: (D)
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
www.edubuzz360.com
ChettinadTech Dept of CSE
A. Back Patching is putting the address instead of labels when the proper label is determined.
B. Back patching is the activity of filling up the unspecified information of labels by using the
appropriate semantic expression in during the code generation process.
C. It is done by Boolean expression.
Answer: (D)
24. The three address code is a combination of assignment and a binary operator.
A. True
B. False
Answer: (B)
Answer: (D)
https://play.google.com/store/apps/details?id=com.sss.edubuzz360