Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Recent questions and answers in Compiler Design
0
votes
0
answers
1
BARC 2024 CSE
Number of nodes in the DAG(Directed Acyclic Graph) representing (a+b)+c+(a+b)
Ayanava Dutta
asked
in
Compiler Design
2 days
ago
by
Ayanava Dutta
37
views
normal
directed-acyclic-graph
compiler-design
0
votes
1
answer
2
UGC NET CSE | June 2005 | Part 2 | Question: 35
Symbol Table can be used for : Checking type compatibility Suppressing duplication of error message Storage allocation All of these
ajayraho
answered
in
Compiler Design
Mar 1
by
ajayraho
251
views
ugcnetcse-june2005-paper2
compiler-design
symbol-table
0
votes
1
answer
3
UGC NET CSE | June 2005 | Part 2 | Question: 33
Which activity is not included in the first pass of two pass assemblers? Build the symbol table Construct the machine code Separate mnemonic opcode and operand fields. None of these
ajayraho
answered
in
Compiler Design
Mar 1
by
ajayraho
193
views
ugcnetcse-june2005-paper2
compiler-design
assembler
0
votes
2
answers
4
UGC NET CSE | June 2005 | Part 2 | Question: 32
Which of the following is the most general phase – structured grammar ? Regular Context – Sensitive Context free None of these
ajayraho
answered
in
Compiler Design
Mar 1
by
ajayraho
324
views
ugcnetcse-june2005-paper2
compiler-design
grammar
context-sensitive
0
votes
4
answers
5
NIELIT 2018-56
Identify the total number of tokens in the given statement printf("A%B=",&i); $7$ $8$ $9$ $13$
yadavmayank742
answered
in
Compiler Design
Feb 19
by
yadavmayank742
2.6k
views
nielit-2018
compiler-design
compiler-tokenization
21
votes
4
answers
6
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 back-end includes phases that are specific to the target hardware. S3: The back-end includes phases that are ... $\mathbf{S 3}$ are all TRUE. Only $\mathbf{S 1}$ and $\mathbf{S 3}$ are TRUE.
Ambike jaiswal
answered
in
Compiler Design
Feb 18
by
Ambike jaiswal
14.5k
views
gatecse-2023
compiler-design
compilation-phases
1-mark
1
vote
2
answers
7
GATE CSE 2024 | Set 2 | Question: 11
Consider the following two sets: Set $\text{X}$ Set $\text{Y}$ P. Lexical Analyzer 1. Abstract Syntax Tree Q. Syntax Analyzer 2. Token R. Intermediate Code Generator 3. Parse Tree S. Code Optimizer 4. Constant Folding Which one of the following options is the CORRECT match ... $\mathrm{P}-4 ; \mathrm{Q}-3 ; \mathrm{R}-2 ; \mathrm{S}-1$
Ambike jaiswal
answered
in
Compiler Design
Feb 18
by
Ambike jaiswal
2.0k
views
gatecse2024-set2
compiler-design
compilation-phases
match-the-following
2
votes
1
answer
8
GATE CSE 2024 | Set 2 | Question: 55
Consider the following augmented grammar, which is to be parsed with a $\text{SLR}$ parser. The set of terminals is $\{a, b, c, d, \#, @\}$ \[ \begin{array}{l} S^{\prime} \rightarrow S \\ S \rightarrow S S|A a| b A c|B c| b ... $\operatorname{GOTO}\left(I_{0}, S\right)$ is __________.
Hira Thakur
answered
in
Compiler Design
Feb 17
by
Hira Thakur
2.2k
views
gatecse2024-set2
numerical-answers
compiler-design
0
votes
1
answer
9
GATE CSE 2024 | Set 1 | Question: 29
Consider the following pseudo-code. $L 1 : t 1 = -1$ $L 2: t 2 = 0$ $L 3: t 3 = 0$ $L 4: t 4 = 4 * t 3$ $L 5: t 5 = 4 * t 2$ $L 6: t 6 = t 5 * M$ $L 7: t 7 = t 4+t 6$ ... options CORRECTLY specifies the number of basic blocks and the number of instructions in the largest basic block, respectively? $6$ and $6$ $6$ and $7$ $7$ and $7$ $7$ and $6$
Hira Thakur
answered
in
Compiler Design
Feb 17
by
Hira Thakur
1.5k
views
gatecse2024-set1
compiler-design
2
votes
1
answer
10
GATE CSE 2024 | Set 2 | Question: 30
Consider the following context-free grammar where the start symbol is $\text{S}$ and the set of terminals is $\{a, b, c, d\}$. \[ \begin{array}{l} S \rightarrow A a A b \mid B b B a \\ A \rightarrow c S \mid \epsilon \\ B \rightarrow d S \mid \epsilon \end{ ... blank $(4)$ blank $(1)$ $S \rightarrow B b B a$ $(2)$ $S \rightarrow A a A b$ $(3)$ blank $(4)$ blank
Hira Thakur
answered
in
Compiler Design
Feb 17
by
Hira Thakur
2.8k
views
gatecse2024-set2
compiler-design
0
votes
1
answer
11
GATE CSE 2024 | Set 1 | Question: 28
Consider the following grammar $G$, with $S$ as the start symbol. The grammar $G$ has three incomplete productions denoted by $(1), (2)$, and $(3)$ ... $R \rightarrow c R$ (1) $S \rightarrow R f$ (2) $T \rightarrow c T$ (3) $R \rightarrow c R$
Hira Thakur
answered
in
Compiler Design
Feb 17
by
Hira Thakur
1.4k
views
gatecse2024-set1
compiler-design
0
votes
2
answers
12
GATE CSE 2024 | Set 1 | Question: 27
Consider the following syntax-directed definition $\text{(SDD)}$. $S \rightarrow D H T U$ $ \left\{S.v a l = D.val + H.val + T.val + U.val\right\};$ $D \rightarrow ^{"} \mathrm{M}^{"} D_1$ ... the following options is the $\text{CORRECT}$ value computed by the $\text{SDD}$ (in the attribute $S.val$)? $45$ $50$ $55$ $65$
Hira Thakur
answered
in
Compiler Design
Feb 17
by
Hira Thakur
1.5k
views
gatecse2024-set1
compiler-design
syntax-directed-translation
0
votes
1
answer
13
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 $S$. The string $w=a^{30} b^{30} c^{30}$ is derivable from $S$. The number of steps (application of rules) in the derivation $S \rightarrow^* w$ is __________.
aniketwaghela
answered
in
Compiler Design
Feb 17
by
aniketwaghela
1.1k
views
gatecse2024-set1
numerical-answers
compiler-design
2
votes
1
answer
14
GATE CSE 2024 | Set 2 | Question: 19
Which of the following statements is/are FALSE? An attribute grammar is a syntax-directed definition $\text{(SDD)}$ in which the functions in the semantic rules have no side effects The attributes in a $\text{L}$-attributed definition ... $\text{L}$-attributed definitions based on $\text{LR(1)}$ grammar can be evaluated using a bottom-up parsing strategy
Sachin Mittal 1
answered
in
Compiler Design
Feb 17
by
Sachin Mittal 1
2.2k
views
gatecse2024-set2
compiler-design
syntax-directed-translation
multiple-selects
2
votes
1
answer
15
GATE CSE 2024 | Set 2 | Question: 33
Consider the following expression: $x[i]=(p+r) *-s[i]+u / w$. The following sequence shows the list of triples representing the given expression, with entries missing for triples $(1), (3)$, and $(6)$ ... $(1)$ [ ]$=s i \quad(3)-(0)(2) \quad(6)=[ ] x i$
puspeshsrivastava
answered
in
Compiler Design
Feb 17
by
puspeshsrivastava
1.4k
views
gatecse2024-set2
compiler-design
1
vote
1
answer
16
GATE CSE 2024 | Set 1 | Question: 16
Which of the following is/are Bottom-Up Parser(s)? Shift-reduce Parser Predictive Parser LL$(1)$ Parser LR Parser
Hira Thakur
answered
in
Compiler Design
Feb 17
by
Hira Thakur
1.8k
views
gatecse2024-set1
multiple-selects
compiler-design
2
votes
1
answer
17
GATE CSE 2024 | Set 1 | Question: 23
Consider the operator precedence and associativity rules for the integer arithmetic operators given in the table below. Operator Precedence Associativity + Highest Left - High Right * Medium Right / Low Right The value of the expression $3+1+5 * 2 / 7+2-4-7-6 / 2$ as per the above rules is ________.
Hira Thakur
answered
in
Compiler Design
Feb 17
by
Hira Thakur
1.9k
views
gatecse2024-set1
numerical-answers
compiler-design
2
votes
1
answer
18
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 26
Which attributes in the following grammar are synthesized? A.a B.b B.x C.c
Chaitanya Sai
answered
in
Compiler Design
Feb 6
by
Chaitanya Sai
711
views
goclasses2024-mockgate-14
compiler-design
syntax-directed-translation
multiple-selects
1-mark
4
votes
1
answer
19
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 52
Consider the following given grammar and the parse tree for the sentence $x + y * z.$ The first reduction made by the shift-reduce parser is labeled as 1, and we keep labeling in the same increasing order, such that the 8th (here, the ... labeled 3. $T \rightarrow T^* P$ will be labeled 6. $T \rightarrow T^* P$ will be labeled 7.
GO Classes
answered
in
Compiler Design
Feb 5
by
GO Classes
256
views
goclasses2024-mockgate-14
compiler-design
parsing
2-marks
4
votes
0
answers
20
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 53
The grammar shown below is LL(k) for some value of k. What is the smallest value of k for which this grammar is LL(k)?
GO Classes
asked
in
Compiler Design
Feb 5
by
GO Classes
821
views
goclasses2024-mockgate-14
numerical-answers
compiler-design
parsing
ll-parser
2-marks
12
votes
4
answers
21
GATE CSE 2023 | Question: 27
Consider the control flow graph shown. Which one of the following choices correctly lists the set of live variables at the exit point of each basic block? $\text{B1: { }, B2: {a}, B3: {a}, B4: {a}}$ $\text{B1: {i, j}, B2: {a}, B3: {a}, B4: {i}}$ $\text{B1: {a, i, j}, B2: {a, i, j}, B3: {a, i}, B4: {a}}$ $\text{B1: {a, i, j}, B2: {a, j}, B3: {a, j}, B4: {a, i, j}}$
Shreyas16
answered
in
Compiler Design
Feb 3
by
Shreyas16
11.5k
views
gatecse-2023
compiler-design
live-variable-analysis
2-marks
0
votes
1
answer
22
compiler design tcompiler-design-timothy-g-griffin
6. Generate code for the following C program using any code generation algorithm. [3 Marks] main() { int x, a, b, c, d, e; x= a + b -( c + d ) * e }
prasantkr.singh
answered
in
Compiler Design
Feb 1
by
prasantkr.singh
109
views
compiler-design
syntax-directed-translation
code-optimization
parsing
ullman
3
votes
1
answer
23
GO Classes Test Series 2024 | Mock GATE | Test 13 | Question: 38
Consider the syntax-directed translation given by the following grammar and semantic rules. Here, $S$ is the only non-terminal and $\Sigma=\{0,1,2\}$ is a set of terminals. $\text{S.val}$ denotes the synthesized attribute (a ... $3$ value. The value computed by the translation scheme for the input string $201$ is $20.$
Philosophical_Virus
answered
in
Compiler Design
Jan 29
by
Philosophical_Virus
453
views
goclasses2024-mockgate-13
goclasses
compiler-design
syntax-directed-translation
multiple-selects
2-marks
4
votes
1
answer
24
GO Classes Test Series 2024 | Mock GATE | Test 13 | Question: 39
Consider the following grammar $ \begin{aligned} & A \rightarrow B B \\ & B \rightarrow b \end{aligned} $ Suppose we draw an $\operatorname{LR}(0)$ automatan for the given grammar then which of the ... transitions There is exactly one state with $2$ incoming transitions There is exactly one state with $3$ outgoing transitions
GO Classes
answered
in
Compiler Design
Jan 28
by
GO Classes
322
views
goclasses2024-mockgate-13
goclasses
compiler-design
lr-parser
multiple-selects
2-marks
0
votes
0
answers
25
is there something wrong in the production rules?
pcla
asked
in
Compiler Design
Jan 28
by
pcla
74
views
syntax-directed-translation
compiler-design
57
votes
11
answers
26
GATE CSE 2017 Set 1 | Question: 43
Consider the following grammar: stmt $\rightarrow$ if expr then expr else expr; stmt | $Ò$ expr $\rightarrow$ term relop term | term term $\rightarrow$ id | number id $\rightarrow$ a | b | c number $\rightarrow [0-9]$ where relop is a relational ... program if $e_1$ then $e_2$ else $e_3$ has $2$ control flow paths. $e_1 \rightarrow e_2$ and $e_1 \rightarrow e_3$.
rajveer43
answered
in
Compiler Design
Jan 25
by
rajveer43
20.0k
views
gatecse-2017-set1
compiler-design
parsing
normal
numerical-answers
5
votes
1
answer
27
GO Classes Test Series 2024 | Mock GATE | Test 12 | Question: 2
Consider the following grammar- ... $\text{Follow(T)}$ are same. $\operatorname{First}(\mathrm{A})$ and $\operatorname{First}(\mathrm{T})$ are same.
GauravRajpurohit
answered
in
Compiler Design
Jan 21
by
GauravRajpurohit
506
views
goclasses2024-mockgate-12
goclasses
compiler-design
parsing
first-and-follow
multiple-selects
1-mark
2
votes
1
answer
28
GO Classes Test Series 2024 | Mock GATE | Test 12 | Question: 33
Consider the following grammar: $ \begin{aligned} & S \rightarrow a S^{\prime} \\ & S^{\prime} \rightarrow b S^{\prime} \mid \epsilon \end{aligned} $ Which of the following is/are CORRECT right sentential form of the given grammar? $a b S^{\prime}$ $bS'$ $a S^{\prime} b$ $bbS$
squirrel69
answered
in
Compiler Design
Jan 21
by
squirrel69
426
views
goclasses2024-mockgate-12
goclasses
compiler-design
parsing
multiple-selects
2-marks
4
votes
1
answer
29
GO Classes Test Series 2024 | Mock GATE | Test 12 | Question: 16
Consider the following context-free grammar, with start symbol $S$ and terminals $a, ; , \lt , \gt .$ $ S \rightarrow \;\lt L \mid a \qquad L \rightarrow a R \mid \;\lt L R \quad R \rightarrow\;\gt\; \mid \;; L $ How many different parse trees are there for the string $\lt \lt a \gt ;a\gt ?$
GO Classes
answered
in
Compiler Design
Jan 21
by
GO Classes
330
views
goclasses2024-mockgate-12
goclasses
numerical-answers
compiler-design
parsing
context-free-grammar
1-mark
5
votes
1
answer
30
GO Classes Test Series 2024 | Mock GATE | Test 12 | Question: 34
$ \begin{aligned} & S \rightarrow S1 \;T \\ & S 1 \rightarrow a \mid(S S) \\ & T \rightarrow \varepsilon \mid b \;T \end{aligned} $ In the $\text{LL(1)}$ parser table, $M$ ... $\{T \rightarrow \varepsilon\}$ $\{S 1 \rightarrow a\}$ and $\{T \rightarrow \varepsilon\}$
GO Classes
answered
in
Compiler Design
Jan 21
by
GO Classes
375
views
goclasses2024-mockgate-12
goclasses
compiler-design
parsing
ll-parser
2-marks
0
votes
1
answer
31
see Dragon Book 3.9, pp.173, pp . 179)
How to minimize a DFA ? How to convert RE to DFA directly?
prasantkr.singh
answered
in
Compiler Design
Jan 17
by
prasantkr.singh
73
views
1
vote
3
answers
32
NIELIT Scientific Assistant A 2020 November: 52
In case of the dynamic programming approach the value of an optimal solution is computed in : Top down fashion Bottom up fashion Left to Right fashion Right to Left fashion
Bishes
answered
in
Compiler Design
Jan 17
by
Bishes
616
views
nielit-sta-2020
compiler-design
dynamic-programming
44
votes
7
answers
33
GATE CSE 2014 Set 1 | Question: 34
A canonical set of items is given below $S \to L .> R $ $Q \to R.$ On input symbol $<$ the set has a shift-reduce conflict and a reduce-reduce conflict. a shift-reduce conflict but not a reduce-reduce conflict. a reduce-reduce conflict but not a shift-reduce conflict. neither a shift-reduce nor a reduce-reduce conflict.
squirrel69
answered
in
Compiler Design
Jan 16
by
squirrel69
20.6k
views
gatecse-2014-set1
compiler-design
parsing
normal
4
votes
1
answer
34
GO Classes Test Series 2024 | Mock GATE | Test 11 | Question: 54
Consider the following grammar given below. ... the last character of the string: $a^* b($ $\operatorname{CC}($ $\mathrm{BC}($ $\mathrm{CB}$ $\mathrm{BB}$
pranavbhosle_
answered
in
Compiler Design
Jan 16
by
pranavbhosle_
697
views
goclasses2024-mockgate-11
goclasses
compiler-design
parsing
lr-parser
2-marks
3
votes
3
answers
35
GATE Overflow | Compiler Design | Test 1 | Parsing | Question: 5
Which of the following statements regarding $LR(0)$ parser is FALSE? A $LR(0)$ configurating set cannot have multiple reduce items A $LR(0)$ configurating set cannot have both shift as well as reduce items If a reduce item is ... a $LR(0)$ configurating set it cannot have any other item A $LR(0)$ parser can parse any regular grammar
squirrel69
answered
in
Compiler Design
Jan 16
by
squirrel69
3.0k
views
go-cd-1
parsing
lr-parser
1
vote
5
answers
36
When LALR(1) is constructed form CLR(1) does not contain any shift reduce conflicts?
squirrel69
answered
in
Compiler Design
Jan 16
by
squirrel69
6.7k
views
compiler-design
parsing
lr-parser
0
votes
1
answer
37
Made easy mock test question from Compiler Design
Please show the procedure for the given question.
Ajay_0410
answered
in
Compiler Design
Jan 15
by
Ajay_0410
113
views
compiler-design
parsing
made-easy-test-series
0
votes
1
answer
38
Compiler-design
Q1. For the following grammar N -> AB | BA A -> a | CAC B -> b | CBC C -> a | b Find the FIRST and FOLLOW
KajuKatli
answered
in
Compiler Design
Jan 14
by
KajuKatli
129
views
compiler-design
syntax-directed-translation
lexical-analysis
ullman
parsing
3
votes
1
answer
39
GO Classes Test Series 2024 | Mock GATE | Test 11 | Question: 27
Suppose there is a handle on the top of the stack at some point in time while performing $\text{LR(k)}$ parsing. In this context, a cetrain $\text{LR(k)}$ parsers may exhibit uncertainty in ... The parser may perform reduction without generating any conflict. The parser may execute a shift operation without generating any conflict.
ayush_27
answered
in
Compiler Design
Jan 14
by
ayush_27
477
views
goclasses2024-mockgate-11
goclasses
compiler-design
parsing
lr-parser
multiple-selects
1-mark
3
votes
1
answer
40
GO Classes Test Series 2024 | Mock GATE | Test 11 | Question: 26
A lexical analyzer uses the following patterns to recognize four tokens $\textsf{T1, T2, T3},$ and $\textsf{T4}$ over the alphabet $ \{a,b,c\}.$ Rule1: aa*b*c* { print ( T1 ); } Rule2: c { print ( T2 ); ... never be used? Note that the analyzer outputs the token that matches the longest possible prefix. Rule$1$ Rule$2$ Rule$3$ Rule$4$
Shadymee
answered
in
Compiler Design
Jan 14
by
Shadymee
568
views
goclasses2024-mockgate-11
goclasses
compiler-design
lexical-analysis
compiler-tokenization
multiple-selects
1-mark
To see more, click for all the
questions in this category
.
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Recent Posts
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(25)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(683)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
243k
comments
79.7k
users
Recent questions and answers in Compiler Design
Recent Blog Comments
Hlo I'm Rupesh I got AIR 3485 in gate CS and AIR...
@Ajay Sasank here is the direct link...
Thank you for the post didi My GATE 2023 & 2024...
I Hope it helps 😊
Today's best post I seen thank you for motivation