CS606 All Midterm Papers Quizzes + Mcqz LR parsers can handle ________________ grammars. Left-recursive Page no: 163 file-recursive End...
CS606 All Midterm Papers Quizzes + Mcqz
LR parsers can handle ________________ grammars.
Left-recursive Page no: 163
file-recursive
End-recursive
Start-recursive
_____ convert the reloadable machine code into absolute machine code by
linking library and reloadable object files.
Assembler
Loader/link-editor
Compiler
Preprocessor
Consider the grammar A --> B C D
B --> h B | epsilon
C --> C g | g | C h | i
D --> A B | epsilon
Follow of B is _____________ .
h
g, h, i, $
g, i
g
Consider the grammar A --> B C D
B --> h B | epsilon
C --> C g | g | C h | i
D --> A B | epsilon
Follow of C is _____________ .
g, h, i, $ Page no : 47
g, h, $
h, i, $
h, g, $
An important component of semantic analysis is __________________ .
code checking
type checking page no : 6
flush checking
None of the given
In PASCAL ___________ represent the inequality test.
:=
=
<>
None of the given
Lexical Analyzer generator ________________ is written in Java.
Flex
Jlex Page no : 26
Complex
None of given
____________avoid hardware stalls and interlocks.
Register allocation
Instruction scheduling Page no : 10
Instruction selection
None of given
Consider the following grammar,
A --> B C D
B --> h B | episilon
C --> C g | g | C h | i
D --> A B | episilon
First of A is _______________ .
h, g, i
g h
None of the given
Recursive ____________ parsing is done for LL(1) grammar.
Decent Page no : 47
Ascent
Forward
Backward
One of the core tasks of compiler is to generate fast and compact executable
code.
True
False
Left factoring of a grammar is done to save the parser from back tracking.
True Page no:61
False
Responsibility of ______________ is to produce fast and compact code.
Instruction selection
Register allocation
Instruction scheduling
None of given Page no: 9
________________ algorithm is used in DFA minimization.
James’s
Robert’s
Hopcroft’s Page no:25
None of given
Compilers are sometimes classified as.
Single pass
Multi pass
Load and go
All of the given
In multi pass compiler during the first pass it gathers information
about ___________________ .
Select correct option:
Declaration
Bindings
Static information
None of the given **
Question # 9 of 10 ( Start time: 06:40:30 PM ) Total Marks: 1
Flex is an automated tool that is used to get the minimized DFA (scanner).
Select correct option:
True
False
In compilation process Hierarchical analysis is also called
Select correct option:
Parsing
Syntax analysis
Both Parsing and Syntax analysis
None of given
For each language to make LL(1) grammar, we take two steps, 1st is removing
left recurrence and 2nd is applying fin sequence.
True
False
_____________is evaluated to yield a value.
Command
Expression
Declaration
Declaration and Command
LR parsers can handle ________________ grammars.
Left-recursive page no : 63
file-recursive
End-recursive
Start-recursive
Optimal registers allocation is an NP-hard problem.
True
False Page no : 10
Parser takes tokens from scanner and tries to generate _______________ .
Binary Search tree
Parse tree
Syntax trace Page no : 6
None of the given
Front end of two pass compiler takes_________________ as input.
Source code Page no: 5
Intermediate Representation (IR)
Machine Code
None of the Given
In DFA minimization we construct one _______________ for each group of
states from the initial DFA.
State Page no : 25
NFA
PDA
None of given
In Three-pass compiler _____________ is used for code improvement or
optimization.
Front End
Middle End Page no : 10
Back End
Both Front end and Back end
________________ of a two-pass compiler is consists of Instruction selection,
Register allocation and Instruction scheduling.
Back end Page no : 9
Front end
Start
None of given
NFA is easy to implement as compared to DFA.
True
False Page no : 19
We can get an LL(1) grammar by ________________ .
Removing left recurrence
Applying left factoring
Removing left recurrence and Applying left factoring
None of the given
Parser always gives a tree like structure as output
True page no : 37
False
Intermediate Representation (IR) stores the value of its operand in
Registers
Memory
Hard disk
Secondary storage
In Back End module of compiler, optimal register allocation
uses_______________ .
O(log n)
O(n log n)
N P-Complete Page no : 10
None of the given
CS 606 Quizez
Can a DFA simulate NFA?
Yes
No
Sometimes
Depend upon nfa
____________________ phase which supports macro substitution and conditional
compilation.
Semantic
Syntax
Preprocessing
None
Which of the statement is true about Regular Languages?
Regular Languages are the most popular for specifying tokens.
Regular Languages are based on simple and useful theory.
Regular Languages are easy to understand.
All of the given
Lexer and scanner are two different phases of compiler
True
False Page no :13
Lexical Analyzer generator ________________ is written in Java.
Flex
Jlex Page no :26
Complex
None of the given
In a transition table cells of the table contain the ________ state.
Reject state
Next state Page no 18
Previous state
None of the given
The transition graph for an NFA that recognizes the language ( a | b)*abb will have
following set of states.
{0}
{0,1}
{0,1,2}
{0,1,2,3} not sure
Front end of two pass compiler takes_________________ as input.
Source code
Intermediate representation
Machine code
None
Functions of Lexical analyzer are?
Removing white space
Removing constants, identifiers and keywords
Removing comments
All of the given
Question # 1 of 10 ( Start time: 07:25:59 PM ) Total Marks: 1
Front-end of a two pass compiler is consists of Scanner.
Select correct option:
True
False
Question # 2 of 10 ( Start time: 07:26:40 PM ) Total Marks: 1
LL(1) parsing is called non-predictive parsing.
Select correct option:
True