Web Page

$$\small{\overset{{\large{\textbf{Mark Distribution in Previous GATE}}}}{\begin{array}{|c|c|c|c|c|c|c|c|}\hline \textbf{Year}&\textbf{2019}&\textbf{2018}&\textbf{2017-1}&\textbf{2017-2}&\textbf{2016-1}&\textbf{2016-2}&\textbf{Minimum}&\textbf{Average}&\textbf{Maximum} \\\hline\textbf{1 Mark Count}&2&1&2&2&1&1&1&1.5&2 \\\hline\textbf{2 Marks Count}&2&2&2&1&3&2&1&2&3 \\\hline\textbf{Total Marks}&6&5&6&4&7&5&\bf{4}&\bf{5.5}&\bf{6}\\\hline \end{array}}}$$

# Recent questions in Compiler Design

1
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
2
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.
3
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.
4
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
5
A top down parser generates Left most derivation Right most derivation Left most derivation in reverse Right most derivation in reverse
6
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
7
The output of lexical analyzer is: A set of regular expressions Strings of character Syntax tree Set of tokens
8
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$
9
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
10
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
11
Let $L$ be a language and $L’$ be its complement. Which one of the following is NOT a viable possibility? Neither $L$ nor $L’$ is RE. One of the $L$ and $L’$ is RE but not recursive;the other is not RE. Both $L$ and $L’$ are RE but not recursive. Both $L$ and $L’$ are recursive.
12
Let $L1$ be a recursive language, and let $L2$ be a recursively enumerable but not recursive language. Which one of the following is TRUE? $L1’$ is recursive and $L2’$is recursively enumerable. $L1’$ is recursive and $L2’$is not recursively enumerable. $L1’$ and $L2’$is recursively enumerable. $L1’$ is recursively enumerable and $L2’$is recursive.
13
Which of the following is machine independent optimization? Loop optimization Redundancy Elimination Folding All of the option
14
The grammar $S\rightarrow aSb\mid bSa\mid SS\mid \varepsilon$ is: Unambiguous CFG Ambiguous CFG Not a CFG Deterministic CFG
15
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
16
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)
17
Which of the following statements is/are true in the context of interpreters? $S1$: Interpreters process program according to the logical flow of control through the program. $S2$: Interpreter translates and executes the error-free first instruction before it goes to the second. $S3$: Interpreter ... interpreted languages. Only $S1$ Only $S3$ Only $S1$, $S2$ and $S3$ Only $S1$, $S2$ and $S4$