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
39
votes
7
answers
1
GATE CSE 2015 Set 2 | Question: 29
Consider the intermediate code given below. (1) i=1 (2) j=1 (3) t1 = 5 * i (4) t2 = t1 + j (5) t3 = 4 * t2 (6) t4 = t3 (7) a[t4] = -1 (8) j = j + 1 (9) if j <= 5 goto (3) (10) i = i +1 (11) if i < 5 goto (2) The number of nodes and edges in control-flow-graph constructed for the above code, respectively, are $5$ and $7$ $6$ and $7$ $5$ and $5$ $7$ and $8$
Rohit gundeti
answered
in
Compiler Design
6 days
ago
by
Rohit gundeti
20.2k
views
gatecse-2015-set2
compiler-design
intermediate-code
normal
1
vote
2
answers
2
GATE CSE 2023 | Question: 50
Consider the syntax directed translation given by the following grammar and semantic rules. Here $N, I, F$ and $B$ are non-terminals. $N$ is the starting non-terminal, and $\#, \mathbf{0}$ and $\mathbf{1}$ are lexical tokens ... \] The value computed by the translation scheme for the input string $10\#011$ is ____________. (Rounded off to three decimal places)
Hira Thakur
answered
in
Compiler Design
Feb 16
by
Hira Thakur
987
views
gatecse-2023
compiler-design
syntax-directed-translation
numerical-answers
2-marks
1
vote
3
answers
3
NIELIT Scientific Assistant A 2020 November: 118
The $\text{LL(1)}$ and $\text{LR(0)}$ techniques are ___________ Both same in power Both simulate reverse of right most derivation Both simulate reverse of left most derivation Incomparable
DMeher
answered
in
Compiler Design
Feb 15
by
DMeher
343
views
nielit-sta-2020
compiler-design
parsing
5
votes
2
answers
4
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.
Deepak Poonia
answered
in
Compiler Design
Feb 15
by
Deepak Poonia
2.6k
views
gatecse-2023
compiler-design
compilation-phases
1-mark
2
votes
0
answers
5
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}}$
admin
asked
in
Compiler Design
Feb 15
by
admin
1.2k
views
gatecse-2023
compiler-design
live-variable
2-marks
3
votes
4
answers
6
GATE CSE 2023 | Question: 9
Consider the following definition of a lexical token $\textbf{id}$ for an identifier in a programming language, using extended regular expressions: \[ \begin{array}{ll} \textbf{ letter } & \rightarrow[\mathrm{A}-\mathrm{Za}-\mathrm{ ... Finite-state Automata with $\epsilon$-transitions accepts the set of valid identifiers? (A double-circle denotes a final state)
Hira Thakur
answered
in
Theory of Computation
Feb 10
by
Hira Thakur
1.0k
views
gatecse-2023
theory-of-computation
regular-expression
1-mark
21
votes
7
answers
7
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? Lexical analyzer Syntax analyzer Semantic analyzer Machine dependent optimizer
PreyumKr
answered
in
Compiler Design
Jan 31
by
PreyumKr
11.3k
views
gatecse-2021-set2
compilation-phases
compiler-design
1-mark
64
votes
12
answers
8
GATE CSE 2016 Set 1 | Question: 19
Consider the following code segment. x = u - t; y = x * v; x = y + w; y = t - z; y = x * y; The minimum number of total variables required to convert the above code segment to static single assignment form is __________.
strawberry-jam
answered
in
Compiler Design
Jan 28
by
strawberry-jam
22.4k
views
gatecse-2016-set1
compiler-design
static-single-assignment
normal
numerical-answers
69
votes
9
answers
9
GATE CSE 2003 | Question: 18
In a bottom-up evaluation of a syntax directed definition, inherited attributes can always be evaluated be evaluated only if the definition is L-attributed be evaluated only if the definition has synthesized attributes never be evaluated
eliecher
answered
in
Compiler Design
Jan 23
by
eliecher
30.1k
views
gatecse-2003
compiler-design
syntax-directed-translation
normal
73
votes
8
answers
10
GATE CSE 2005 | Question: 61
Consider line number $3$ of the following C-program. int main() { /*Line 1 */ int I, N; /*Line 2 */ fro (I=0, I<N, I++); /*Line 3 */ } Identify the compiler’s response about this line while creating the object-module: No compilation error Only a lexical error Only syntactic errors Both lexical and syntactic errors
eliecher
answered
in
Compiler Design
Jan 21
by
eliecher
16.9k
views
gatecse-2005
compiler-design
compilation-phases
normal
1
vote
2
answers
11
UPPCL AE 2018:17
Which of the following statements are $\text{TRUE}$? Top-down parsers are equipped to handle left recursive grammar. $\text{LALR}$ parser is more powerful than an $\text{SLR}$ parser Recursive descent parsing is an example of top-down parsing. $\text{III}$ only $\text{I}$ only $\text{II}$ only $\text{II}$ and $\text{III}$
GNANESWARA SAI
answered
in
Compiler Design
Jan 19
by
GNANESWARA SAI
252
views
uppcl2018
compiler-design
parsing
49
votes
2
answers
12
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 inside Viable prefixes appear only at the top of the stack and not inside The stack contains only a set of viable prefixes The stack never contains viable prefixes
Johnny1001
answered
in
Compiler Design
Jan 16
by
Johnny1001
15.7k
views
gatecse-2015-set1
compiler-design
parsing
normal
viable-prefix
2
votes
2
answers
13
Write Quadruples,Triples, and indirect Triples for the expression
Write Quadruples,Triples, and indirect Triples for the expression : (a+b) * (c+d) - (a+b+c)
Johnny1001
answered
in
Compiler Design
Jan 15
by
Johnny1001
25.9k
views
compiler-design
three-address-code
0
votes
2
answers
14
Compiler Design | Error in which stage detection
What is the earliest stage compiler error for the following C code snippet: int x = @33; Lexical Error Syntax Error Semantic Error None
Johnny1001
answered
in
Compiler Design
Jan 15
by
Johnny1001
158
views
compiler-design
lexical-analysis
error-detection
0
votes
2
answers
15
#nptel
The goal of structured programming is which the following: a. To have well indented programs b. To be able to infer the flow of control from the compiled code c. To be able to infer the flow of control from the program source code d. To avoid the use of GO TO statements e. To have modular programs
Johnny1001
answered
in
Compiler Design
Jan 15
by
Johnny1001
119
views
0
votes
2
answers
16
Attributes in syntax directed translation
Attributes are said to be of two type, synthesised and inherited. What actually is an attribute? Why an attribute exist, how to define it?
Johnny1001
answered
in
Compiler Design
Jan 15
by
Johnny1001
91
views
syntax-directed-translation
compiler-design
0
votes
0
answers
17
register allocation
nbhatt
asked
in
Compiler Design
Jan 12
by
nbhatt
58
views
compiler-design
register-allocation
ace-test-series
0
votes
1
answer
18
Min number of register needed for this program without spilling ?
deepak_7891
answered
in
Compiler Design
Jan 5
by
deepak_7891
149
views
compiler-design
register-allocation
zeal
0
votes
1
answer
19
Made Easy Textbook Problem | Compiler Design | CLR(1) | Look-a-heads
Let G be any grammar with the following productions: X → X+Y | Y Y→ Y*Z | Z Z → (X) Z → id If LR(1) parser is used to parse the above grammar, then total how many look-a-heads are present for the item “X→.Y” and “Z →.id” in the initial state?
Souvik33
answered
in
Compiler Design
Jan 1
by
Souvik33
212
views
compiler-design
made-easy-test-series
parsing
made-easy-booklet
lr-parser
0
votes
3
answers
20
Compute FIRST and FOLLOW for the postfix grammar S → S S + | S S * | a (Remove left recusrion and find out first and follow)
ritik456
answered
in
Compiler Design
Dec 30, 2022
by
ritik456
550
views
compiler-design
left-recursion
1
vote
2
answers
21
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
aaaakash001
answered
in
Compiler Design
Dec 29, 2022
by
aaaakash001
192
views
nielit-sta-2020
compiler-design
dynamic-programming
0
votes
1
answer
22
COMPILER design
Is S->aS left recursive grammer?
Mudit Jain
asked
in
Compiler Design
Dec 27, 2022
by
Mudit Jain
69
views
left-recursion
0
votes
0
answers
23
Unacademy AIMT 1
The correct answer given is 3.
TusharKumar
asked
in
Compiler Design
Dec 23, 2022
by
TusharKumar
176
views
compiler-design
three-address-code
intermediate-code
0
votes
1
answer
24
Push Down Automation | Parsing | Input Buffer and Stack
Consider a situation, where the input buffer is still having elements, and our PDA has reached final state. Given that for next input element the final state has no transition defined. In above situation will the i/p string be ... in all cases May be accepted if empty stack acceptance is allowed in the given PDA Something else, I can explain
Souvik33
asked
in
Compiler Design
Dec 20, 2022
by
Souvik33
79
views
theory-of-computation
pushdown-automata
context-free-grammar
0
votes
1
answer
25
Parsing Table | Shift Reduce Parsers | Numerical Answer
Consider the following statements regarding the Parsing Table of a shift reduce parser, for any given grammar No. of states/ size of parse table is same for all Shift-Reduce Parsers. No. of states/ size of parse table in LR(0), SLR(1 ... CORRECT statement is _______ (For example, if statement 1 and 7 are correct, answer would be 1+7, i.e. 8)
Souvik33
asked
in
Compiler Design
Dec 11, 2022
by
Souvik33
165
views
compiler-design
parsing
lr-parser
numerical-answers
difficult
descriptive
0
votes
0
answers
26
#CompilerDesign #made-easy-test-series
what should be the ans?? according to me answer should be 7 nodes, 8 edges but 5 nodes, 6 edges is given in the answer key! please tell me what am i doing wrong.
jay03
asked
in
Compiler Design
Nov 28, 2022
by
jay03
115
views
made-easy-test-series
compiler-design
0
votes
1
answer
27
Compiler Design self Doubt
"Every Regular Grammar has a Right linear grammar and this is LL(1)" What is meaning of this statement exactly and does it hold always? My Assumptions: If a grammar is right linear grammar then it can be parser by LL(1) ->I ... right linear grammar. But this is not suffice to make grammar LL(1). Correct if I assumed anything wrong with some intutive answer.
vishnu777
asked
in
Compiler Design
Nov 25, 2022
by
vishnu777
126
views
compiler-design
ll-parser
parsing
2
votes
0
answers
28
gateforum
closed
h4kr
asked
in
Compiler Design
Nov 23, 2022
by
h4kr
78
views
compiler-design
theory-of-computation
2
votes
0
answers
29
gateforum
h4kr
asked
in
Compiler Design
Nov 20, 2022
by
h4kr
102
views
compiler-design
gateforum-test-series
0
votes
0
answers
30
Compiler principles Techniques and Tools
For sr 7,11- 1. i.Strings of 0's and 1's of the form aa', where a is binary string and a' is reverse of a. ii. Binary string of the form xy s.t. x!=y. Total length of xy is even, each of x and y be of odd length
_harshit__01
asked
in
Compiler Design
Nov 14, 2022
by
_harshit__01
75
views
compiler-design
strings
0
votes
0
answers
31
Construct unambiguous context-free grammars for each of the following languages. In each case show that your grammar is correct. Arithmetic expressions in postfix notation. Left-associative lists of identifiers separated by commas. Right-associative lists of identifiers separated by commas. Arithmetic expressions of integers and identifiers with the four binary operators +, -, *, /
Shongkor
asked
in
Compiler Design
Nov 4, 2022
by
Shongkor
143
views
compiler-design
context-free-grammar
0
votes
0
answers
32
made easy test series
Caption
Himanshu555
asked
in
Compiler Design
Oct 24, 2022
by
Himanshu555
127
views
made-easy-test-series
three-address-code
grammar
0
votes
1
answer
33
Compiler Design (Parsing)
S -> L = R S -> R L -> * R L -> id R -> L Is given CFG LR(0) & SLR(1)?
Kartheek8899
asked
in
Compiler Design
Oct 14, 2022
by
Kartheek8899
178
views
compiler-design
parsing
1
vote
1
answer
34
TIFR CSE 2022 | Part B | Question: 7
Consider the following grammar: $\text{P, Q, R}$ are non-terminals; $c, d$ are terminals; $\text{P}$ is the start symbol; and the production rules follow. $\mathrm{P}::=\mathrm{QR}$ $\text{Q ::= c}$ $\text{Q} ::=\text{RcR}$ ... has three consecutive $c\text{'s}$ Every string produced by the grammar has at least has many $d\text{'s}$ as $c\text{'s}$
admin
asked
in
Compiler Design
Sep 1, 2022
by
admin
158
views
tifr2022
compiler-design
grammar
0
votes
1
answer
35
Made easy Test Series;
Here i am getting ans 8. Please explain
Amit Mehta
asked
in
Compiler Design
Jul 29, 2022
by
Amit Mehta
348
views
compiler-design
0
votes
1
answer
36
Madeasy test Series
Please explain how 2?
Amit Mehta
asked
in
Compiler Design
Jul 29, 2022
by
Amit Mehta
173
views
code-optimization
made-easy-test-series
0
votes
3
answers
37
Test Series 2022
Ans is a,b,d
Amit Mehta
asked
in
Compiler Design
Jul 24, 2022
by
Amit Mehta
211
views
operator-precedence
0
votes
1
answer
38
Test Series
Here i am getting ans as 1872 but ans given is 2208
Amit Mehta
asked
in
Compiler Design
Jul 24, 2022
by
Amit Mehta
177
views
compiler-design
1
vote
1
answer
39
Compiler Design
Confusion in follow of A,Please clarify.
Overflow04
asked
in
Compiler Design
Jul 12, 2022
by
Overflow04
180
views
compiler-design
ace-test-series
first-and-follow
0
votes
0
answers
40
B) Construct DFA for the following regular expressions and assure the minimum number of states in the constructed DFA. (i) ab*a*(a/b) (ii) 1(1+0)* + 10(0 + 1) *
ankitak70853211234
asked
in
Compiler Design
Jul 2, 2022
by
ankitak70853211234
232
views
number-of-dfa
compiler-design
To see more, click for all the
questions in this category
.
Subscribe to GATE CSE 2023 Test Series
Subscribe to GO Classes for GATE CSE 2023
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
BITSHD 2023
My journey from being a MSc student to AIR 239 in GATE CSE 2023 and qualified UGC-NET JRF.
NEEPCO Recruitment 2023
GATE CSE 2023 Results
IIIT Banglore MTech 2023-24
Subjects
All categories
General Aptitude
(2.5k)
Engineering Mathematics
(9.3k)
Digital Logic
(3.3k)
Programming and DS
(5.9k)
Algorithms
(4.6k)
Theory of Computation
(6.7k)
Compiler Design
(2.3k)
Operating System
(5.0k)
Databases
(4.6k)
CO and Architecture
(3.8k)
Computer Networks
(4.7k)
Non GATE
(1.3k)
Others
(2.5k)
Admissions
(653)
Exam Queries
(845)
Tier 1 Placement Questions
(17)
Job Queries
(76)
Projects
(9)
Unknown Category
(866)
Recent questions and answers in Compiler Design
Recent Blog Comments
Please provide some tips about NET, since I want...
Amazing story to hear
Link added now:...
Sir can you please provide some good resources...
Where can we see the responses of the form filled?