A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

91. Reduction in strength means
a. replacing a costly operation by a relatively cheaper one
b. replacing run-time computation by compile time computation
c. Both (a) & (b)
d. removing loop invariant computation
View Answer Report Discuss Too Difficult!
Answer: (c).Both (a) & (b)

92. Substitution of values for names whose values are constant, is done in
a. constant folding
b. loop optimization
c. local optimization
d. none of these
View Answer Report Discuss Too Difficult!
Answer: (a).constant folding

93. Function of the syntax phase is to
a. build a uniform symbol table.
b. build a literal table and an identifier table.
c. parse the source program into the basic elements or tokens of the language.
d. recognize the major constructs of the language and to cal the appropriate action routines that wil generate the intermediate form or matrix for these constructs
View Answer Report Discuss Too Difficult!
Answer: (d).recognize the major constructs of the language and to cal the appropriate action routines that wil generate the intermediate form or matrix for these constructs

94. Which of the following features cannot be captured by CFG ?
a. matching nested paranthesis
b. syntax of recursive procedures
c. syntax of if-then-else statements
d. whether a variable is declared before its use
View Answer Report Discuss Too Difficult!
Answer: (a).matching nested paranthesis

95. Which of the following statement is true ?
a. SLR parser is more powerful than LALR
b. Canonical LR parser is nore powerful than LALR parser
c. LALR parser is more powerful than Canonical LR parser
d. the parsers SLR, Canonical LR, and LALR  have the same power
View Answer Report Discuss Too Difficult!
Answer: (b).Canonical LR parser is nore powerful than LALR parser

96. Which is not true about syntax and semantic parts of a computer language?
a. Semantics is the responsibility of the programmer.
b. Semantics is checked mechanically by a computer.
c. Both (a) and (b)
d. Syntax is generally checked by the programmer.
View Answer Report Discuss Too Difficult!
Answer: (c).Both (a) and (b)

97. The table created by lexical analysis to describe all literals used in the source program is
a. Reductions
b. Literal table
c. Identiier table
d. Terminal table
View Answer Report Discuss Too Difficult!
Answer: (b).Literal table

98. The task(s) of the Lexial analysis phase is/are:
a. to build a uniform symbol table
b. to build a literal table and an identifier table
c. to parse the source program into the basic elements or tokens of the language
d. All of the above
View Answer Report Discuss Too Difficult!
Answer: (d).All of the above

99. The table created by lexical analysis to describe all literals used in the source program, is:
a. Reductions
b. Literal table
c. Identifier table
d. Terminal table
View Answer Report Discuss Too Difficult!
Answer: (b).Literal table

100. The function(s) of the Syntax phase is/ are:
a. to build a uniform symbol table
b. to build a literal table and an identifier table
c. to parse the source program into the basic elements or tokens of the language
d. to recognize the major constructs of the language and to call the appropriate action routines that will generate the intermediate form or matrix for these constructs
View Answer Report Discuss Too Difficult!
Answer: (d).to recognize the major constructs of the language and to call the appropriate action routines that will generate the intermediate form or matrix for these constructs

Page 10 of 11