search
Log In

Web Page

Lexical analysis, Parsing, Syntax-directed translation, Runtime environments, Intermediate code generation.

$$\scriptsize{\overset{{\large{\textbf{Mark Distribution in Previous GATE}}}}{\begin{array}{|c|c|c|c|c|c|c|c|}\hline
\textbf{Year}&\textbf{2021-1}&\textbf{2021-2}&\textbf{2020}&\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}&1&2&2&2&1&2&2&1&1&1&1.5&2
\\\hline\textbf{2 Marks Count}&3&2&1&2&2&2&1&3&2&1&2&3
\\\hline\textbf{Total Marks}&7&6&4&6&5&6&4&7&5&\bf{4}&\bf{5.5}&\bf{7}\\\hline
\end{array}}}$$

Recent questions in Compiler Design

6 votes
6 answers
1
Consider the following $\text{ANSI C}$ program: int main () { Integer x; return 0; } Which one of the following phases in a seven-phase $C$ compiler will throw an error? Lexical analyzer Syntax analyzer Semantic analyzer Machine dependent optimizer
asked Feb 18 in Compiler Design Arjun 2.6k views
0 votes
3 answers
2
In the context of compilers, which of the following is/are $\text{NOT}$ an intermediate representation of the source program? Three address code Abstract Syntax Tree $\text{(AST)}$ Control Flow Graph $\text{(CFG)}$ Symbol table
asked Feb 18 in Compiler Design Arjun 931 views
2 votes
2 answers
3
Consider the following $\text{ANSI C}$ code segment: z=x + 3 + y->f1 + y->f2; for (i = 0; i < 200; i = i + 2) { if (z > i) { p = p + x + 3; q = q + y->f1; } else { p = p + y->f2; q = q + x + 3; } } Assume that the variable $y$ points to ... the form $\textsf{ y ->f1}$ or $\textsf{y ->f2}$) in the optimized code, respectively, are: $403$ and $102$ $203$ and $2$ $303$ and $102$ $303$ and $2$
asked Feb 18 in Compiler Design Arjun 744 views
0 votes
1 answer
4
Consider the following augmented grammar with $\{ \#, @, <, >, a, b, c \}$ ... $I_0 = \text{CLOSURE}(\{S' \rightarrow \bullet S\})$. The number of items in the set $\text{GOTO(GOTO}(I_0<), <)$ is ___________
asked Feb 18 in Compiler Design Arjun 384 views
1 vote
2 answers
5
Consider the following statements. $S_1$: Every $\text{SLR(1)}$ grammar is unambiguous but there are certain unambiguous grammars that are not $\text{SLR(1)}$. $S_2$: For any context-free grammar, there is a parser that takes at most $O(n^3)$ time to parse a string of length $n$. ... $S_2$ is false $S_1$ is false and $S_2$ is true $S_1$ is true and $S_2$ is true $S_1$ is false and $S_2$ is false
asked Feb 18 in Compiler Design Arjun 402 views
0 votes
2 answers
6
Consider the following grammar (that admits a series of declarations, followed by expressions) and the associated syntax directed translation $\text{(SDT)}$ ... The actions can be used to type-check syntactically correct boolean variable declarations and boolean expressions. The actions will lead to an infinite loop
asked Feb 18 in Compiler Design Arjun 902 views
3 votes
2 answers
7
Consider the following context-free grammar where the set of terminals is $\{a,b,c,d,f\}$ ... $1\;\text{blank} \qquad 2\;S \rightarrow Rf \qquad 3\; \text{blank} \qquad 4\;\text{blank} $
asked Feb 18 in Compiler Design Arjun 341 views
1 vote
2 answers
8
Consider the following $C$ code segment: $\begin{array}{lllll} a & = & b & + & c; \\ e & = & a& + & 1; \\ d & = & b & + & c; \\ f & = & d& + & 1; \\ g& = & e&+&f; \end{array}$ a = b + c; e = a + 1; d = b + c; f = d + 1; g = e + f; In a compiler, this code segment is represented internally as a directed acyclic graph $\text{(DAG)}$. The number of nodes in the $\text{DAG}$ is _____________
asked Feb 18 in Compiler Design Arjun 340 views
2 votes
1 answer
9
Which of the following is not an intermediate code form? Syntax trees Three address codes Quadrupules Post fix Notation
asked Nov 20, 2020 in Compiler Design jothee 798 views
2 votes
1 answer
10
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)$
asked Nov 20, 2020 in Compiler Design jothee 140 views
0 votes
1 answer
11
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$
asked Nov 20, 2020 in Compiler Design jothee 131 views
0 votes
1 answer
12
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
asked Apr 2, 2020 in Compiler Design Lakshman Patel RJIT 330 views
0 votes
1 answer
13
0 votes
1 answer
14
0 votes
1 answer
15
0 votes
1 answer
16
Context-free grammar can be recognized by finite state automation $2$- way linear bounded automata push down automata both (B) and (C)
asked Apr 2, 2020 in Compiler Design Lakshman Patel RJIT 199 views
0 votes
1 answer
17
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
asked Apr 1, 2020 in Compiler Design Lakshman Patel RJIT 317 views
1 vote
2 answers
19
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.
asked Mar 31, 2020 in Compiler Design Lakshman Patel RJIT 626 views
0 votes
2 answers
20
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.
asked Mar 31, 2020 in Compiler Design Lakshman Patel RJIT 281 views
...