Login
Register
Dark Mode
Brightness
Ambient Glow – Questions list
Register
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions and answers in Compiler Design
1
1 vote
2
2 answers
315
315 views
GO Classes DPP | COMPILER|DATA DEPENDENCY
Consider the following $C$ code segment: A[i] = A[i] + 1; // Line 1 j = i + 1; // Line 2 A[j] = A[i] * 2; // Line 3 k = i; // Line 4 A[k] = A[k] + 1; // Line 5In the cont...
binaryXninja
315
views
answered
2 days
ago
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-155
goclasses-compiler-practice-questions
numerical-answers
+
–
1
1 vote
3
3 answers
346
346 views
GO Classes DPP | COMPILER|DATA DEPENDENCY
Consider the following $C$ code segment: x = y + 1; // Line 1 y = x - 2; // Line 2 z = x + y; // Line 3 x = 5; // Line 4 y =z * 2; // Line 5In the context of instruction-...
binaryXninja
346
views
answered
2 days
ago
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-155
goclasses-compiler-practice-questions
numerical-answers
+
–
32
32 votes
5
5 answers
15.3k
15.3k views
GATE CSE 2024 | Set 1 | Question: 49
Let $G=(V, \Sigma, S, P)$ be a context-free grammar in Chomsky Normal Form with $\Sigma=\{a, b, c\}$ and $V$ containing $10$ variable symbols including the start symbol $...
akshay_123
15.3k
views
answered
3 days
ago
Compiler Design
gatecse-2024-set1
numerical-answers
compiler-design
grammar
two-marks
+
–
89
89 votes
9
answers
9 answers
38.8k
38.8k views
GATE CSE 2010 | Question: 37
The program below uses six temporary variables $a, b, c, d, e, f$.a = 1 b = 10 c = 20 d = a + b e = c + d f = c + e b = c + e e = b + f d = 5 + e return d + fAssuming tha...
HB_1573
38.8k
views
answered
3 days
ago
Compiler Design
gatecse-2010
compiler-design
register-allocation
normal
+
–
39
39 votes
4
answers
4 answers
20.4k
20.4k views
GATE CSE 2005 | Question: 83b
Consider the following expression grammar. The semantic rules for expression evaluation are stated next to each grammar production.$$\begin{array}{l|l} E\rightarrow numbe...
priyangsu45
20.4k
views
answered
3 days
ago
Compiler Design
gatecse-2005
compiler-design
parsing
normal
+
–
8
8 votes
8
8 answers
2.4k
2.4k views
GATE CSE 2026 | Set 1 | Question: 32
Consider the control flow graph shown in the figure. Which one of the following options correctly lists the set of redundant expressions (common subexpressions) in the ba...
Shailja_
2.4k
views
answered
5 days
ago
Compiler Design
gatecse-2026-set1
compiler-design
two-marks
code-optimization
+
–
50
50 votes
3
answers
3 answers
13.7k
13.7k views
GATE CSE 1992 | Question: 02,xiii
For a context free grammar, FOLLOW(A) is the set of terminals that can appear immediately to the right of non-terminal $A$ in some "sentential" form. We define two sets L...
priyangsu45
13.7k
views
answered
6 days
ago
Compiler Design
gate1992
parsing
compiler-design
normal
multiple-selects
first-and-follow
+
–
47
47 votes
13
answers
13 answers
34.0k
34.0k views
GATE CSE 2021 | Set 2 | Question: 3
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?Lex...
priyangsu45
34.0k
views
answered
6 days
ago
Compiler Design
gatecse-2021-set2
compilation-phases
compiler-design
one-mark
+
–
54
54 votes
9
9 answers
28.3k
28.3k views
GATE CSE 2023 | Question: 1
Consider the following statements regarding the front-end and back-end of a compiler.S1: The front-end includes phases that are independent of the target hardware.S2: The...
priyangsu45
28.3k
views
answered
6 days
ago
Compiler Design
gatecse-2023
compiler-design
compilation-phases
one-mark
+
–
42
42 votes
4
answers
4 answers
20.7k
20.7k views
GATE CSE 2021 | Set 2 | Question: 30
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 ...
priyangsu45
20.7k
views
answered
6 days
ago
Compiler Design
gatecse-2021-set2
code-optimization
compiler-design
two-marks
+
–
64
64 votes
6
answers
6 answers
21.8k
21.8k views
GATE CSE 2015 | Set 2 | Question: 14
In the context of abstract-syntax-tree (AST) and control-flow-graph (CFG), which one of the following is TRUE?In both AST and CFG, let node $N_2$ be the successor of node...
priyangsu45
21.8k
views
answered
6 days
ago
Compiler Design
gatecse-2015-set2
compiler-design
easy
abstract-syntax-tree
code-optimization
+
–
80
80 votes
6
6 answers
28.2k
28.2k views
GATE CSE 2015 | Set 1 | Question: 13
Which one of the following is TRUE at any valid state in shift-reduce parsing?Viable prefixes appear only at the bottom of the stack and not insideViable prefixes appear ...
priyangsu45
28.2k
views
answered
6 days
ago
Compiler Design
gatecse-2015-set1
compiler-design
parsing
normal
viable-prefix
lr-parser
+
–
12
12 votes
8
8 answers
2.2k
2.2k views
GATE CSE 2026 | Set 2 | Question: 35
Consider the control flow graph given below.Which one of the following options is the set of live variables at the exit point of each basic block?$\mathrm{B} 1:\{\mathrm{...
Shailja_
2.2k
views
answered
6 days
ago
Compiler Design
gatecse-2026-set2
compiler-design
basic-blocks
two-marks
+
–
3
3 votes
2
2 answers
329
329 views
GO Classes DPP | COMPILER|FOLLOW SET
Consider the following context-free grammar:$E \rightarrow T E^{\prime}$ $E^{\prime} \rightarrow+T E^{\prime} \mid \epsilon$ $T \rightarrow F T^{\prime}$ $T^{\prime} \rig...
Prashant-G
329
views
answered
Oct 1
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-153
goclasses-compiler-practice-questions
+
–
2
2 votes
5
5 answers
638
638 views
GO Classes DPP | COMPILER|FIRST AND FOLLOW
Consider the following grammar $G$ with start symbol $E$ :$E \rightarrow T R$ $R \rightarrow+T R \mid \epsilon$ $T \rightarrow f$Which of the following statement(s) is/ar...
Prashant-G
638
views
answered
Oct 1
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-165
goclasses-compiler-practice-questions
multiple-selects
+
–
0
0 votes
1
1 answer
731
731 views
GATE CSE 2026 | Set 1 | COA | Memory Based | Question 64
Consider a pipelined processor in which the execution (EX) stage is shared by all instructions. The execution stage takes different different time for different instruct...
kiv
731
views
answered
Oct 1
Compiler Design
goclasses
gate2026_cs_set1_memorybased
co-and-architecture
numerical-answers
hazards
pipelining
two-marks
+
–
0
0 votes
0
0 answers
63
63 views
MADE EASY TEST SERIES MSQ
Which of the following statements about lexical error handling is/are TRUE?A. Lexical analyzers may use finite automata with error transitions to recognize malformed toke...
RAM _00
63
views
asked
Sep 30
Compiler Design
compiler-design
made-easy-test-series
+
–
0
0 votes
0
0 answers
37
37 views
MADE EASY TEST SERIES
Code improving transformation can be done at which of the following stages?A. Source codeB. Intermediate codeC. Target codeD. All of these
RAM _00
37
views
asked
Sep 30
Compiler Design
made-easy-test-series
+
–
74
74 votes
6
answers
6 answers
30.1k
30.1k views
GATE CSE 2015 | Set 1 | Question: 8
For computer based on three-address instruction formats, each address field can be used to specify which of the following:(S1) A memory operand(S2) A processor register(S...
engineerbug
30.1k
views
answered
Sep 30
Compiler Design
gatecse-2015-set1
compiler-design
intermediate-code
normal
+
–
4
4 votes
2
2 answers
454
454 views
GO Classes DPP | COMPILER|FOLLOW SET
Consider the following context-free grammar:Productions:$S \rightarrow A$$S \rightarrow B$$A \rightarrow a A b$$A \rightarrow \epsilon$$B \rightarrow c B d$$B \rightarrow...
Prashant-G
454
views
answered
Sep 29
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-169
goclasses-compiler-practice-questions
+
–
5
5 votes
2
2 answers
527
527 views
GO Classes DPP | COMPILER|FIRST SET
Consider the following grammar. Uppercase letters are non-terminals, lowercase letters are terminals, and $\epsilon$ is the empty string.$S \rightarrow A B \mid g h$ $A \...
Prashant-G
527
views
answered
Sep 29
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-173
goclasses-compiler-practice-questions
+
–
2
2 votes
2
2 answers
333
333 views
GO Classes DPP | COMPILER|FOLLOW SET
Consider the following grammar $G$ with non-terminals $\{S, A, B, C\}$ and terminals $\{a, b, c, d, g\}$ :$$\begin{aligned}& S \rightarrow A B \\& A \rightarrow a A \mid ...
Prashant-G
333
views
answered
Sep 29
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-179
goclasses-compiler-practice-questions
+
–
3
3 votes
2
2 answers
328
328 views
GO Classes DPP | COMPILER|FIRST AND FOLLOW SET
Consider the following context-free grammar:$$\begin{aligned}& E \rightarrow T R \\& R \rightarrow+T R \mid \epsilon \\& T \rightarrow F Y \\& Y \rightarrow * F Y \mid \e...
Prashant-G
328
views
answered
Sep 29
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-179
goclasses-compiler-practice-questions
+
–
10
10 votes
5
5 answers
2.7k
2.7k views
GATE CSE 2026 | Set 2 | Question: 31
Consider the canonical $L R(0)$ parsing of the grammar below using terminals $\{a, b, c\}$ and non-terminals $\{A, B, C, S\}$ with $S$ as the start symbol.\[\begin{array}...
Divyanshu_raj 757
2.7k
views
answered
Sep 26
Compiler Design
gatecse-2026-set2
compiler-design
lr-parser
two-marks
+
–
22
22 votes
11
11 answers
13.6k
13.6k views
GATE CSE 2025 | Set 2 | Question: 41
Consider two grammars $G_{1}$ and $G_{2}$ with the production rules given below: $G_{1} : S \rightarrow$ $if$ $E$ $then$ $S$ $|$ $if$ $E$ $then$ $S$ $else$ $S$ $|$ $a$ ...
Kartik_Sharma 2
13.6k
views
answered
Sep 25
Compiler Design
gatecse2025-set2
compiler-design
grammar
multiple-selects
easy
two-marks
+
–
39
39 votes
4
answers
4 answers
9.3k
9.3k views
GATE CSE 2012 | Question: 52
For the grammar below, a partial $LL(1)$ parsing table is also presented along with the grammar. Entries that need to be filled are indicated as $E1, E2,$ and $E3$. $\var...
Diju1234
9.3k
views
answered
Sep 22
Compiler Design
gatecse-2012
compiler-design
parsing
normal
first-and-follow
+
–
124
124 votes
18
answers
18 answers
64.5k
64.5k views
GATE CSE 2013 | Question: 9
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 \rightarrow \epsilo...
Diju1234
64.5k
views
answered
Sep 21
Compiler Design
gatecse-2013
compiler-design
parsing
normal
lr-parser
+
–
26
26 votes
3
answers
3 answers
17.7k
17.7k views
GATE CSE 2022 | Question: 3
Which one of the following statements is $\text{TRUE}?$The $\textit{LALR}(1)$ parser for a grammar $\textit{G}$ cannot have reduce-reduce conflict if the $\textit{LR}(1)$...
aryan_jaiswal
17.7k
views
answered
Sep 20
Compiler Design
gatecse-2022
compiler-design
parsing
one-mark
lr-parser
+
–
0
0 votes
0
0 answers
74
74 views
PW - Compiler Design Parser's DPP Question
Check if it's LR(1) or not? Please draw the DFA too.S ➔ S1 I 0S1 | 1
Toufiq Hussain
74
views
asked
Sep 20
Compiler Design
compiler-design
lr-parser
+
–
53
53 votes
7
answers
7 answers
25.5k
25.5k views
GATE CSE 2008 | Question: 12
Some code optimizations are carried out on the intermediate code becauseThey enhance the portability of the compiler to the target processorProgram analysis is more accur...
Gulshan_Kumar 4
25.5k
views
answered
Sep 10
Compiler Design
gatecse-2008
normal
code-optimization
compiler-design
+
–
0
0 votes
1
1 answer
722
722 views
zeal
Consider the following control flow graphThe live-variable analysis determines for each point $p$ in a program which variables are live at that point. A live variable v a...
Abhinav_Mishra
722
views
answered
Sep 8
Compiler Design
test-series
zeal-test-series
compiler-design
live-variable-analysis
+
–
24
24 votes
6
6 answers
8.4k
8.4k views
GATE CSE 2025 | Set 1 | Question: 2
Which ONE of the following statements is FALSE regarding the symbol table?Symbol table is responsible for keeping track of the scope of variables.Symbol table can be impl...
saismrutiranjan18
8.4k
views
answered
Sep 3
Compiler Design
gatecse2025-set1
compiler-design
symbol-table
easy
one-mark
+
–
9
9 votes
6
6 answers
2.6k
2.6k views
GATE CSE 2026 | Set 2 | Question: 25
A lexical analyzer uses the following token definitions${letter → [A-Za-z]}$${digit → [0-9]}$${id → letter (letter | digit)^*}$${number → digit}$ ${ }^{+}$${ws → (blank |...
saismrutiranjan18
2.6k
views
answered
Sep 3
Compiler Design
gatecse-2026-set2
compiler-design
compiler-tokenization
numerical-answers
one-mark
+
–
27
27 votes
6
6 answers
11.1k
11.1k views
GATE CSE 2025 | Set 2 | Question: 30
Given a Context-Free Grammar $\text{G}$ as follows:\[\begin{array}{l}S \rightarrow A a|b A c| d c \mid b d a \\A \rightarrow d\end{array}\]Which ONE of the following st...
harryputtar
11.1k
views
answered
Sep 1
Compiler Design
gatecse2025-set2
compiler-design
context-free-grammar
parsing
lr-parser
two-marks
+
–
23
23 votes
8
8 answers
9.5k
9.5k views
GATE CSE 2025 | Set 2 | Question: 12
Given the following syntax directed translation rules:Rule 1: $R \rightarrow A B\{B . i=R . i-1 ; A . i=B . i ; R . i=A . i+1 ;\}$Rule 2: $P \rightarrow C D\{P . i=C . ...
harryputtar
9.5k
views
answered
Sep 1
Compiler Design
gatecse2025-set2
compiler-design
syntax-directed-translation
one-mark
+
–
20
20 votes
4
4 answers
8.0k
8.0k views
GATE CSE 2025 | Set 2 | Question: 11
Consider the following statements about the use of backpatching in a compiler for intermediate code generation:Backpatching can be used to generate code for Boolean e...
harryputtar
8.0k
views
answered
Sep 1
Compiler Design
gatecse2025-set2
compiler-design
backpatching
intermediate-code
one-mark
+
–
18
18 votes
2
answers
2 answers
7.5k
7.5k views
GATE CSE 2025 | Set 1 | Question: 42
Refer to the given $3$-address code sequence. This code sequence is split into basic blocks. The number of basic blocks is ________. (Answer in integer)1001: i = 1 1002: ...
harryputtar
7.5k
views
answered
Sep 1
Compiler Design
gatecse2025-set1
compiler-design
three-address-code
basic-blocks
numerical-answers
easy
two-marks
+
–
21
21 votes
4
4 answers
7.0k
7.0k views
GATE CSE 2025 | Set 1 | Question: 36
Which of the following statement(s) is/are TRUE while computing $\operatorname{First}$ and $\operatorname{Follow}$ during top down parsing by a compiler?For a production ...
harryputtar
7.0k
views
answered
Sep 1
Compiler Design
gatecse2025-set1
compiler-design
first-and-follow
parsing
multiple-selects
two-marks
+
–
23
23 votes
5
5 answers
7.0k
7.0k views
GATE CSE 2025 | Set 1 | Question: 3
Which ONE of the following techniques used in compiler code optimization uses live variable analysis?Run-time function call managementRegister assignment to variablesStre...
harryputtar
7.0k
views
answered
Sep 1
Compiler Design
gatecse2025-set1
compiler-design
code-optimization
easy
one-mark
+
–
0
0 votes
1
1 answer
201
201 views
Compiler Design - 3 address
lambodar_pal
201
views
asked
Aug 11
Compiler Design
compiler-design
three-address-code
address
ullman
+
–
To see more, click for all the
questions in this category
.