# Recent questions tagged compiler-design

1 vote
1 answer
1
Which of the following is not an intermediate code form? Syntax trees Three address codes Quadrupules Post fix Notation
2 votes
1 answer
2
Which of the following are applications of symbol table? Storage allocation Checking type compatibility Suppressing duplicate error messages Choose the correct answer from the options given below: $(a)$ and $(b)$ only $(a)$ and $(c)$ only $(b)$ and $(c)$ only $(a)$ $(b)$ and $(c)$
0 votes
1 answer
3
Find the lexicographic ordering of the bit strings given below based on the ordering $0<1$. $001$ $010$ $011$ $0001$ $0101$ Choose the correct answer from the options given below: $001 < 010 < 011 < 0001 < 0101$ $0001 < 001 < 010 < 0101 < 011$ $0001 < 0101 < 001 < 010 < 011$ $001 < 010 < 0001 < 0101 < 011$
0 votes
1 answer
4
Which of the following can be accessed by transfer vector approach of linking? External data segments External subroutines Data located in other procedure All of these
0 votes
1 answer
5
Relocation bits used by relocating loader are specified by Relocating loader itself Linker Assembler Macro processor
0 votes
1 answer
6
The most powerful parser is $\text{SLR}$ $\text{LALR}$ Canonical $\text{LR}$ Operator-precedence
0 votes
1 answer
7
$\text{YACC}$ builds up $\text{SLR}$ parsing table Canonical $\text{LR}$ parsing table $\text{LALR}$ parsing table None of these
0 votes
1 answer
8
Context-free grammar can be recognized by finite state automation $2$- way linear bounded automata push down automata both (B) and (C)
0 votes
1 answer
9
Consider an $\varepsilon$-tree CFG. If for every pair of productions $A\rightarrow u$ and $A\rightarrow v$ If $\text{FIRST(u)} \cap \text{FIRST(v)}$ is empty then the CFG has to be $LL(1).$ If the CFG is $LL(1)$ then $\text{FIRST(u)} \cap \text{FIRST(v)}$ has to be empty. Both $(A)$ and $(B)$ None of the above
2 votes
3 answers
10
Synthesized attribute can easily be simulated by an LL grammar ambiguous grammar LR grammar none of the above
1 vote
2 answers
11
In a single pass assembler, most of the forward references can be avoided by putting the restriction on the number of strings/lifereacts. that the data segment must be defined after the code segment. on unconditional rump. that the data segment be defined before the code segment.
0 votes
2 answers
12
A linker is given object module for a set of programs that were compiled separately. What information need not be included in an object module? Object mode Relocation bits Names and locations of all external symbols defined in the object module. Absolute addresses of internal symbols.
1 vote
3 answers
13
The identification of common sub-expression and replacement of run time computations by compile-time computations is: Local optimization Constant folding Loop Optimization Data flow analysis
0 votes
1 answer
14
The structure or format of data is called Syntax Struct Semantic none of the above
0 votes
1 answer
15
The graph that shows basic blocks and their successor relationship is called: DAG Control graph Flow graph Hamiltonian graph
0 votes
4 answers
16
A top down parser generates Left most derivation Right most derivation Left most derivation in reverse Right most derivation in reverse
0 votes
1 answer
17
Syntax directed translation scheme is desirable because It is based on the syntax It is easy to modify Its description is independent of any implementation All of these
0 votes
5 answers
18
The output of lexical analyzer is: A set of regular expressions Strings of character Syntax tree Set of tokens
0 votes
2 answers
19
What is the maximum number of reduce moves that can be taken by a bottom-up parser for a grammar with no epsilon and unit production (i.e.,of type $A\to\epsilon$ and $A \to a)$ to parse a string with $n$ tokens? $n/2$ $n-1$ $2n-1$ $2^n$
0 votes
5 answers
20
In a compiler, keywords of a language are recognized during parsing of the program the code generation the lexical analysis of the program dataflow analysis
0 votes
1 answer
21
A system program that combines the separately complied modules of a program into a form suitable for execution assembler linking loader cross compiler load and go
1 vote
4 answers
22
Which of the following is machine independent optimization? Loop optimization Redundancy Elimination Folding All of the option
0 votes
1 answer
23
The grammar $S\rightarrow aSb\mid bSa\mid SS\mid \varepsilon$ is: Unambiguous CFG Ambiguous CFG Not a CFG Deterministic CFG
1 vote
1 answer
24
Which of the following statements is/are false? $S1$: $LR(0)$ grammar and $SLR(1)$ grammar are equivalent $S2$: $LR(1)$ grammar are subset of $LALR(1)$ grammars $S1$ only $S1$ and $S2$ both $S2$ only None of the options
0 votes
1 answer
25
The optimization phase in a compiler generally Reduces the space of the code Optimizes the code to reduce execution time Both (A) and (B) Neither (A) nor (B)