Login
Register
Dark Mode
Brightness
Ambient Glow – Questions list
Register
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged compiler
4
4 votes
3
3 answers
400
400 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...
GO Classes
400
views
asked
Jan 1
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-169
goclasses-compiler-practice-questions
+
–
1
1 vote
3
3 answers
343
343 views
GO Classes DPP | COMPILER|FOLLOW SET
Consider the following grammar:$E \rightarrow T R$$R \rightarrow+T R$$R \rightarrow \epsilon$$T \rightarrow F Y$$Y \rightarrow * F Y$$Y \rightarrow \epsilon$$F \rightarro...
GO Classes
343
views
asked
Jan 1
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-169
goclasses-compiler-practice-questions
+
–
1
1 vote
3
3 answers
384
384 views
GO Classes DPP | COMPILER|FIRST SET
Consider the following grammar: $$S \rightarrow A B A \rightarrow a|\epsilon B \rightarrow b| S$$Which of the following represents the correct FIRST(S)?$\{a, b, \epsilon\...
GO Classes
384
views
asked
Jan 1
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-169
goclasses-compiler-practice-questions
+
–
2
2 votes
3
3 answers
321
321 views
GO Classes DPP | COMPILER|LEXICAL ANALYSIS
A lexical analyzer recognizes the following set of tokens defined by regular expressions:Token $1\left(T_1\right)$ : $a$ Token $2\left(T_2\right)$ : $a a$ Token 3 ( $T_3$...
GO Classes
321
views
asked
Jan 1
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-169
goclasses-compiler-practice-questions
numerical-answers
+
–
2
2 votes
3
3 answers
363
363 views
GO Classes DPP | COMPILER|LEXICAL ANALYSIS
Consider the following snippet of code in a C-like language:if(x_val >= 20.5) count = count + 1;Assuming the standard lexical rules (where keywords, identifiers, operator...
GO Classes
363
views
asked
Jan 1
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-169
goclasses-compiler-practice-questions
numerical-answers
+
–
1
1 vote
2
2 answers
391
391 views
GO Classes DPP | COMPILER|LEXICAL ANALYSIS
Consider the following C program fragment processed by a compiler that follows the standard phases of compilation. Focus only on lexical analysis (token generation).int m...
GO Classes
391
views
asked
Dec 30, 2025
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-167
goclasses-compiler-practice-questions
multiple-selects
+
–
2
2 votes
2
2 answers
332
332 views
GO Classes DPP | COMPILER|LEXICAL ANALYSIS
Consider the following expression:int x = 5, y = 2; int z = x+++y; /* Line 2 */How does the Lexical Analyzer generate tokens for the expression $\verb|x+++y|$ in Line $2$...
GO Classes
332
views
asked
Dec 30, 2025
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-167
goclasses-compiler-practice-questions
+
–
3
3 votes
3
3 answers
300
300 views
GO Classes DPP | COMPILER|LEXICAL ANALYSIS
Which of the following is typically NOT a task performed by the compiler during the token generation phase?IDENTIFYING KEYWORDS AND IDENTIFIERS CHECKING IF AN EXPRESSION ...
GO Classes
300
views
asked
Dec 30, 2025
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-167
goclasses-compiler-practice-questions
+
–
3
3 votes
3
3 answers
266
266 views
GO Classes DPP | COMPILER|COMPILATION PHASES
Consider the following snippet of C codeint main() { /* Line 1 */ int a = 5, b = 10; /* Line 2 */ if (a < b) then { /* Line 3 */ a = a + 1; /* Line 4 */ ...
GO Classes
266
views
asked
Dec 30, 2025
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-167
goclasses-compiler-practice-questions
+
–
4
4 votes
3
3 answers
286
286 views
GO Classes DPP | COMPILER|COMPILATION PHASES
Consider the following snippet of C codeint main() { /* Line 1 */ int x = 10, y = 5; /* Line 2 */ int result; /* Line 3 */ reslt = x + y; /* Line 4 */ }Identi...
GO Classes
286
views
asked
Dec 30, 2025
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-167
goclasses-compiler-practice-questions
+
–
1
1 vote
4
4 answers
491
491 views
GO Classes DPP | COMPILER|FIRST SET
Consider the following grammar $G$ with the set of non-terminals $\{S, A, B\}$ and terminals $\{a, b, c, d\}$ :$$S \rightarrow A B c, A \rightarrow a|\epsilon, B \rightar...
GO Classes
491
views
asked
Dec 26, 2025
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-165
goclasses-compiler-practice-questions
+
–
2
2 votes
4
4 answers
600
600 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...
GO Classes
600
views
asked
Dec 26, 2025
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-165
goclasses-compiler-practice-questions
multiple-selects
+
–
3
3 votes
3
3 answers
518
518 views
GO Classes DPP | COMPILER|FIRST AND FOLLOW
Which of the following statement(s) is/are FALSE while computing $\textbf{FIRST}$ and $\textbf{FOLLOW}$ sets for a Context-Free Grammar?If $X \rightarrow \alpha$ is a pro...
GO Classes
518
views
asked
Dec 26, 2025
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-165
goclasses-compiler-practice-questions
multiple-selects
first-and-follow
+
–
1
1 vote
2
2 answers
382
382 views
GO Classes DPP | COMPILER|CODE OPTIMIZATION
Which one of the following is FALSE?A flow graph is a directed graph where nodes represent basic blocks and edges represent the flow of control. Copy Propagation is an op...
GO Classes
382
views
asked
Dec 26, 2025
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-165
goclasses-compiler-practice-questions
+
–
1
1 vote
2
2 answers
340
340 views
GO Classes DPP | COMPILER|CODE OPTIMIZATION
Which one of the following is FALSE?Reaching Definitions analysis is a forward data flow analysis problem. Live Variable analysis is used to determine which variables hol...
GO Classes
340
views
asked
Dec 26, 2025
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-165
goclasses-compiler-practice-questions
code-optimization
+
–
1
1 vote
2
2 answers
297
297 views
GO Classes DPP | COMPILER | COMPILATION ERROR
A programmer writes the following invalid C statement: $\verb|int total_val#ue =10;|$ .Assuming the compiler adheres to a standard compilation model, which component is p...
GO Classes
297
views
asked
Dec 23, 2025
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-163
goclasses-compiler-practice-questions
+
–
0
0 votes
4
4 answers
296
296 views
GO Classes DPP | COMPILER | EXPRESSION TREE
Given the Prefix (Polish Notation) expression:$$+* / \mathbf{A} \mathbf{B} \mathbf{C}-\mathbf{D} \mathbf{E}$$And the following operand values: $A=12, B=4, C=2, D=10$, $E=...
GO Classes
296
views
asked
Dec 23, 2025
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-163
goclasses-compiler-practice-questions
+
–
4
4 votes
3
3 answers
363
363 views
GO Classes DPP | COMPILER | EXPRESSION TREE
Consider the tree shown below.Each leaf represents a numerical value, which can be chosen to be either $\mathbf{0}$ or $\mathbf{2}$.Over all possible choices of the value...
GO Classes
363
views
asked
Dec 23, 2025
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-163
goclasses-compiler-practice-questions
numerical-answers
+
–
1
1 vote
2
2 answers
292
292 views
GO Classes DPP | COMPILER|CODE OPTIMIZATION
Consider the following ANSI C code segment: w = 5 - y->f_one - x - 2; for (j = 1; j < 150; j = j + 3) { if (j < w) { a = a + y->f_two; b = b + 5 -...
GO Classes
292
views
asked
Dec 23, 2025
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-163
goclasses-compiler-practice-questions
+
–
3
3 votes
3
3 answers
305
305 views
GO Classes DPP | COMPILER|COMPILATION ERROR
Consider line number $\textbf{4}$ of the following C-program. int main() { /* Line 1 */ int value, result; /* Line 2 */ value = 100; /* Line 3 */ result = val...
GO Classes
305
views
asked
Dec 23, 2025
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-163
goclasses-compiler-practice-questions
+
–
2
2 votes
3
3 answers
344
344 views
GO Classes DPP | COMPILER|LEXICAL ANALYZER
A lexical analyzer uses the following regular expressions (REs) to recognize four tokens, $T_1, T_2$, $T_3$, and $T_4$, over the alphabet $\Sigma=\{a, b, c\}$.$T_1:(a \mi...
GO Classes
344
views
asked
Dec 19, 2025
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-161
goclasses-compiler-practice-questions
+
–
2
2 votes
3
3 answers
315
315 views
GO Classes DPP | COMPILER|LEXICAL ANALYZER
Consider the following C code snippet:float val = 2.0; /* Check Condition */ if (val <= MAX) { val /= 2; }What is the total number of tokens identified by the lexical...
GO Classes
315
views
asked
Dec 19, 2025
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-161
goclasses-compiler-practice-questions
numerical-answers
+
–
1
1 vote
4
4 answers
508
508 views
GO Classes DPP | COMPILER|LR PARSER
Consider the following canonical set of LR(0) items:$$I_5=\left\{\begin{array}{l}R \rightarrow x \cdot P y \\R \rightarrow x P \\P \rightarrow y\end{array}\right.$$Which ...
GO Classes
508
views
asked
Dec 19, 2025
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-161
goclasses-compiler-practice-questions
+
–
1
1 vote
2
2 answers
275
275 views
GO Classes DPP | COMPILER|DAG
Consider the following basic block:$$\begin{aligned}& \mathrm{t} 1=\mathrm{a}+\mathrm{b} \\& \mathrm{t} 2=\mathrm{c}+\mathrm{d} \\& \mathrm{t} 3=\mathrm{t} 1 * 2 \\& \mat...
GO Classes
275
views
asked
Dec 19, 2025
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-161
goclasses-compiler-practice-questions
+
–
1
1 vote
2
2 answers
466
466 views
GO Classes DPP | COMPILER|DAG
Consider the following basic block:$$\begin{aligned}& w=x+y \\& z=w * 2 \\& x=y+z \\& w=x-y\end{aligned}$$The minimum number of NODES and the total number of OPERATOR LAB...
GO Classes
466
views
asked
Dec 19, 2025
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-161
goclasses-compiler-practice-questions
+
–
2
2 votes
3
3 answers
385
385 views
GO Classes DPP | COMPILER|BASIC BLOCKS
Consider the intermediate code given below: (1) x = 1 (2) L0: y = 2 (3) if x < 5 goto L1 (4) x = x + 1 (5) goto L0 (6) L1: z = 0 (7) if y 0 goto L2 (8) y = y - 1 (9) L2:...
GO Classes
385
views
asked
Dec 17, 2025
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-159
goclasses-compiler-practice-questions
+
–
3
3 votes
5
5 answers
382
382 views
GO Classes DPP | COMPILER|LEXICAL ANALYSIS
The number of tokens in the following C statement is:for (i = 0; i != 10; i++) { sum += i; } $18$ $21$ $16$ $19$
GO Classes
382
views
asked
Dec 17, 2025
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-159
goclasses-compiler-practice-questions
+
–
2
2 votes
3
3 answers
361
361 views
GO Classes DPP | COMPILER|BASIC BLOCKS
Consider the intermediate code given below: (1) i = 0 (2) t1 = 2 * i (3) j = 10 (4) L1: t2 = t1 + j (5) a[t2] = 5 (6) j = j - 1 (7) if j 0 goto L1 (8) t3 = 1 (9) L2: i =...
GO Classes
361
views
asked
Dec 17, 2025
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-159
goclasses-compiler-practice-questions
+
–
3
3 votes
3
3 answers
264
264 views
GO Classes DPP | COMPILER|LEXICAL ANALYSIS
The number of tokens in the following C statement is$\verb|if(a b && c <= 10) { result = a + b; }|$
GO Classes
264
views
asked
Dec 17, 2025
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-159
goclasses-compiler-practice-questions
numerical-answers
+
–
0
0 votes
1
1 answer
359
359 views
GO Classes DPP | COMPILER|REGISTER ALLOCATION
The program below uses six temporary variables $a, b, c, d, e, f$.a = 5 b = 1 c = a - b d = a + c e = b + d f = c + e a = 2 * d e = 10 return a + e + fAssuming that all o...
GO Classes
359
views
asked
Dec 17, 2025
Compiler Design
goclasses
compiler
goclasses-cs-dpp
goclasses-cs-dpp-day-159
goclasses-compiler-practice-questions
+
–
Page:
« prev
1
2
3
4
5
next »