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.

31. The lexical analyzer takes_________as input and produces a stream of_______as output.
a. Source program, tokens
b. Token, source program
c. Either of the two
d. None of the mentioned
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).Source program, tokens

32. Parsing is also known as
a. Lexical Analysis
b. Syntax Analysis
c. Semantic Analysis
d. Code Generation
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).Syntax Analysis

33. __________ a part of a compiler that takes as input a stream of characters and produces as output a stream of words along with their associated syntactic categories.
a. Parser
b. Optimizer
c. Scanner
d. None of the mentioned
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).Scanner

34. _________an IR-to-IR transformer that tries to improve the IR program in some way.
a. Optimizer
b. Parser
c. Both of the mentioned
d. None of the mentioned
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).Optimizer

35. _________a phase of a compiler that maps the IR program into the instruction set and the finite resources of the target machine.
a. Optimizer
b. Parser
c. None of the mentioned
d. Both of the mentioned
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).None of the mentioned

36. In a compiler the module that checks every character of the source text is called
a. The code generator
b. The code optimizer
c. The lexical analyzer
d. The syntax analyzer
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).The code generator

37. The context free grammar is ambiguous if
a. The grammar contains non-terminals
b. Produces more than one parse tree
c. Production has two non-terminals side by side
d. None of the mentioned
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).Produces more than one parse tree

38. Another Name for Lexical Analyser
a. Linear Phase
b. Linear Analysis
c. Scanning
d. All of the mentioned
View Answer Report Discuss Too Difficult! Search Google
Answer: (d).All of the mentioned

39. An individual token is called ________.
a. Lexeme
b. Lex
c. Both of the mentioned
d. None of the mentioned
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).Lexeme

40. Which phase of the compiler is Lexical Analyser?
a. First
b. Second
c. Third
d. None of the mentioned
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).First

Page 4 of 11