CS606 Midterm MCQS Solved With References by Moaaz
CS606 Midterm MCQS Solved With References by Moaaz
MIDTERM EXAMINATION
Fall 2012
CS606- compiler instruction
1
Question # 4 (Total Marks: 1) Select correct option:
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
code checking
type checking (Page 33)
flush checking
None of the given
:=
=
<>
None of the given
Flex
Jlex (Page 26)
Complex
None of given
2
Question # 8 (Total Marks: 1) Select correct option:
____________avoid hardware stalls and interlocks.
Register allocation
Instruction scheduling (Page 121)
Instruction selection
None of given
3
Question # 12 (Total Marks: 1) Select correct option:
Responsibility of ______________ is to produce fast and compact code.
Instruction selection (Page 9)
Register allocation
Instruction scheduling
None of given
4
Question # 18 (Total Marks: 1) Select correct option:
For each language to make LL(1) grammar, we take two steps, 1st is removing left recurrence and 2nd is
applying left factoring in sequence.
True
False
MIDTERM EXAMINATION
Fall 2012
CS606- compiler instruction
5
Question # 2 (Total Marks: 1) Select correct option:
Front end of two pass compiler takes_________________ as input.
Source code (Page 5)
Intermediate Representation (IR)
Machine Code
None of the Given
Front End
Middle End (Page 10)
Back End
Both Front end and Back end
6
Question # 8 (Total Marks: 1) Select correct option:
Parser always gives a tree like structure as output
True
False
O(log n)
O(n log n)
N P-Complete (Page 10)
None of the given
7
CS606 – Midterm Solved Quizzes (Quiz No.1 & 2)
%% (Page 26)
&&
##
\\
8
Question # 6 of 10 (Total Marks: 1) Select correct option:
In compiler linear analysis is also called.
Select correct option:
Lexical analysis
Scanning
Both lexical analysis and scanning click here for details
None of the given
9
Question # 3 of 10 (Total Marks: 1) Select correct option:
In parser the two LL stand(s) for ____________ .
Left-to-right scan of input
left-most derivation
All of the given click here for detail
None of the given
Single pass
Multi pass
Load and go
All of the given
10
Question # 9 of 10 (Total Marks: 1) Select correct option:
In a transition table cells of the table contain the ________ state.
Reject state
Next state (Page 18)
Previous state
None of the given
11
Question # 5 of 10 (Total Marks: 1) Select correct option:
Front-end of a two pass compiler is consists of Scanner.
True
False (Page 12)
True
False
12
Question # 2 of 10 (Total Marks: 1) Select correct option:
Which of the following statement/s is/are true about Deterministic Finite Automata?
13