Q.1
A basic block can be analyzed by?
  • Flowgraph
  • A graph with cycles
  • DAG
  • Both A & B
Q.2
Which of the following system software resides in the main memory always
  • Text Editor
  • Assembler
  • Linker
  • Loader
Q.3
Type checking is normally done during?
  • Lexical Analysis
  • Syntax Analysis
  • Syntax Directed Translation
  • Code generation
Q.4
Replacement of an expensive operation by a cheaper one is termed as?
  • Reduction in strength
  • Code motion
  • Loop invariant computation
  • All of above
Q.5
The output of a lexical analyzer is
  • A parse tree
  • Intermediate code
  • Machine code
  • A stream of tokens
Q.6
What is the problem writing machine code?
  • Quick to learn
  • Easy to debug
  • Easy to read
  • Hard to remember the binary codes Hard to remember the binary codes
Q.7
In a syntax directed translation scheme, if value of an attribute of a node is a function of the values of the attributes of its children, then it is called
  • synthesized attribute
  • inherited attribute
  • canonical attribute
  • None of the above
Q.8
Compilers translate high-level language into machine code.
  • True
  • False
Q.9
A parse tree showing the value of attributes at each node
  • annotated parse tree
  • syntax tree
  • semantic tree
  • all of the above
Q.10
Number of states require to accept string ends with 10.
  • 3
  • 2
  • 1
  • can’t be represented.
Q.11
It is known as the front-end of the compiler.
  • Analysis Phase
  • Synthesis
Q.12
The lexical analysis for a modern computer language such as Java needs the power of which one of the following machine models in a necessary and sufficient sense?
  • Finite state automata
  • Deterministic pushdown automata
  • Non-Deterministic pushdown automata
  • All of above
Q.13
Which of the following parsers is the most powerful?
  • SLR(1)
  • CLR(1)
  • LALR(1)
  • Operator Precedence
Q.14
For DAG interior nodes represents
  • Names
  • Identifiers
  • Constants
  • Operator
Q.15
A parse tree showing attribute value at each node is called?
  • All of above
  • Concrete tree
  • Syntax tree
  • Annotated parse tree
Q.16
Local and loop optimization in turn provides motivation for?
  • Data flow Analysis
  • Peephole optimization
  • DRA and constant folding
  • All of above
Q.17
Inherited attribute is a natural choice in
  • keeping track of variable declaration
  • checking for the correct use of L-values and R-values
  • both (a) and (b)
  • None of these
Q.18
Output file of Lex is _____ the input file is Myfile?
  • Myfile.e
  • Myfile.yy.c
  • Myfile.lex
  • Myfile.obj
Q.19
In SLR parsing for the grammar E’-->E , E--> aEbE|bEaE|ε, In statefor inputs ‘a’ and ‘b’
  • Both will have shift-reduce conflict
  • Only ‘a’ will have shift-reduce conflict
  • Only ‘b’ will have shift-reduce conflict
  • Neither of the other option
Q.20
The grammar {E-->E+T|T, T-->T*F|F, F-->id} is
  • Ambiguous
  • Unambiguous
  • Partially ambiguous
  • None of the other options
0 h : 0 m : 1 s