Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Webpage for Compiler Design:
Recent questions tagged compiler-design
14
votes
2
answers
1711
CMI2012-A-09
Consider the following programming errors: Type mismatch in an expression. Array index out of bounds. Use of an uninitialized variable in an expression. Which of these errors will typically be caught at compile-time by a modern compiler. I, II and III I and II I and III None of them
Consider the following programming errors:Type mismatch in an expression.Array index out of bounds.Use of an uninitialized variable in an expression.Which of these errors...
go_editor
3.0k
views
go_editor
asked
May 22, 2016
Compiler Design
cmi2012
compiler-design
compilation-phases
normal
+
–
10
votes
3
answers
1712
CMI2011-A-08
In programming languages like C, C++, Python $\dots$ the memory used by a program is typically separated into two parts, the stack and the heap. Consider the following statements: A stack is efficient for managing nested function calls. Stack space is limited while heap space is not. ... $2$ is false. $2$ and $3$ are true but $1$ is false. All three statements are true.
In programming languages like C, C++, Python $\dots$ the memory used by a program is typically separated into two parts, the stack and the heap. Consider the following st...
go_editor
1.7k
views
go_editor
asked
May 19, 2016
Compiler Design
cmi2011
compiler-design
runtime-environment
+
–
7
votes
1
answer
1713
CMI2010-A-08
In programming language terminology, $\text{ call by value }$ refers to the fact that: A function call can return a value. When a function is called, arguments are copied into local storage. Functions can indirectly modify the value of external variables. Every argument passed to a function must have a value.
In programming language terminology, $\text{ call by value }$ refers to the fact that:A function call can return a value.When a function is called, arguments are copied i...
go_editor
1.2k
views
go_editor
asked
May 19, 2016
Compiler Design
cmi2010
compiler-design
runtime-environment
parameter-passing
+
–
0
votes
1
answer
1714
Difference between an Activation Record and Program Control Block
What is the difference between an Activation Record and Program Control Block? Could anyone define each of them first, and then describe how they are different.
What is the difference between an Activation Record and Program Control Block?Could anyone define each of them first, and then describe how they are different.
ryan sequeira
1.2k
views
ryan sequeira
asked
May 14, 2016
Operating System
operating-system
compiler-design
activation-record
program-control-block
+
–
4
votes
3
answers
1715
Which of the following is true for the left recursive grammar
ShiveshRoy
6.3k
views
ShiveshRoy
asked
May 13, 2016
Compiler Design
compiler-design
parsing
grammar
test-series
+
–
9
votes
3
answers
1716
Is CLR(1) grammar and LR(1) grammar are same?
Whether LR(1) grammar is same as that of CLR(1) grammar. If yes then please explain and if not then what is the difference between them?
Whether LR(1) grammar is same as that of CLR(1) grammar. If yes then please explain and if not then what is the difference between them?
ShiveshRoy
12.6k
views
ShiveshRoy
asked
May 13, 2016
Compiler Design
compiler-design
parsing
+
–
10
votes
2
answers
1717
How to Eliminate Indirect Left recursion from this grammar?
$\textbf{Eliminating indirect left-recursion}$ Indirect left-recursion $S\rightarrow Aa|b$ $A\rightarrow Ac| Sd |\in$
$\textbf{Eliminating indirect left-recursion}$Indirect left-recursion$S\rightarrow Aa|b$$A\rightarrow Ac| Sd |\in$
ShiveshRoy
9.1k
views
ShiveshRoy
asked
May 8, 2016
Compiler Design
grammar
compiler-design
parsing
+
–
0
votes
0
answers
1718
A java syntax analyser that can recognize values and say wrong operation or error if unaccepted
Come up with a java syntax analyzer that can recognize: X+y x-y x/y x*y and if x+, -x, it should say wrong operation or an error. Come up with a C syntax analyzer that does the above. why is the one of java better?
Come up with a java syntax analyzer that can recognize:X+yx-yx/yx*yand if x+, -x, it should say wrong operation or an error.Come up with a C syntax analyzer that does the...
allanhao
293
views
allanhao
asked
May 5, 2016
Compiler Design
compiler-design
+
–
2
votes
1
answer
1719
CFG is ambiguous is it possible to make top down and bottom up parsing?
If a grammer(CFG) is ambiguous then we can construct the topdown and bottomup parsing is possible directly???or we will make them into unambiguous then we will construct???
If a grammer(CFG) is ambiguous then we can construct the topdown and bottomup parsing is possible directly???or we will make them into unambiguous then we will construct?...
Prakash059
2.0k
views
Prakash059
asked
May 3, 2016
Compiler Design
compiler-design
context-free-grammar
ambiguous-grammar
+
–
1
votes
3
answers
1720
UGC NET CSE | December 2012 | Part 2 | Question: 35
Which of the following is the most powerful parsing method? LL(I) Canonical LR SLR LALR
Which of the following is the most powerful parsing method?LL(I)Canonical LRSLRLALR
Sanjay Sharma
2.1k
views
Sanjay Sharma
asked
Apr 25, 2016
Theory of Computation
ugcnetcse-dec2012-paper2
compiler-design
parsing
+
–
3
votes
4
answers
1721
Consider the following grammar. How many back tracks are required to generate the string aab from the above grammar?
Consider the following grammar. How many back tracks are required to generate the string aab from the above grammar?S → aB | aAbA → bAb | aB → aB | ε
Harit
5.6k
views
Harit
asked
Apr 25, 2016
Compiler Design
compiler-design
context-free-grammar
parsing
numerical-answers
normal
+
–
1
votes
2
answers
1722
UGC NET CSE | December 2013 | Part 2 | Question: 26
Given the following statements: $S_1$: SLR uses follow information to guide reductions. In case of LR and LALR parsers, the look-aheads are associated with the items and they make use of the left context available to the parser. $S_2$: LR grammar ... $S_2$ is correct. $S_1$ is correct and $S_2$ is not correct. $S_1$ is correct and $S_2$ is correct
Given the following statements:$S_1$: SLR uses follow information to guide reductions. In case of LR and LALR parsers, the look-aheads are associated with the items and t...
Sanjay Sharma
2.3k
views
Sanjay Sharma
asked
Apr 25, 2016
Compiler Design
ugcnetcse-dec2013-paper2
compiler-design
parsing
+
–
17
votes
1
answer
1723
GATE CSE 1991 | Question: 10c
Consider the following grammar for arithmetic expressions using binary operators $-$ and $/$ which are not associative $E \rightarrow E -T\mid T$ $T \rightarrow T/F\mid F$ $F \rightarrow (E) \mid id$ ($E$ is the start symbol ... given production rules and adding at most one more production rule. Convert the grammar obtained above into one that is not left recursive.
Consider the following grammar for arithmetic expressions using binary operators $-$ and $/$ which are not associative$E \rightarrow E -T\mid T$$T \rightarrow T/F\mid F$ ...
go_editor
2.7k
views
go_editor
asked
Apr 24, 2016
Compiler Design
gate1991
grammar
compiler-design
normal
descriptive
+
–
14
votes
5
answers
1724
GATE CSE 1991 | Question: 10b
Consider the following grammar for arithmetic expressions using binary operators $-$ and $/$ which are not associative $E \rightarrow E -T\mid T$ $T \rightarrow T/F\mid F$ $F \rightarrow (E) \mid id$ ($E$ is the start symbol ... with redundant parentheses. Do this with minimum number of changes to the given production rules and adding at most one more production rule.
Consider the following grammar for arithmetic expressions using binary operators $-$ and $/$ which are not associative$E \rightarrow E -T\mid T$$T \rightarrow T/F\mid F$ ...
go_editor
4.1k
views
go_editor
asked
Apr 24, 2016
Compiler Design
gate1991
grammar
compiler-design
normal
descriptive
+
–
22
votes
3
answers
1725
GATE CSE 1991 | Question: 09b
For the following code, indicate the output if static scope rules dynamic scope rules are used var a,b : integer; procedure P; a := 5; b := 10; end {P}; procedure Q; var a, b : integer; P; end {Q}; begin a := 1; b := 2; Q; Write ('a = ', a, 'b = ', b); end
For the following code, indicate the output if static scope rulesdynamic scope rulesare usedvar a,b : integer; procedure P; a := 5; b := 10; end {P}; procedure Q; var a, ...
go_editor
4.3k
views
go_editor
asked
Apr 24, 2016
Compiler Design
gate1991
runtime-environment
normal
compiler-design
parameter-passing
descriptive
+
–
25
votes
2
answers
1726
GATE CSE 1992 | Question: 11b
Write $3$ address intermediate code (quadruples) for the following boolean expression in the sequence as it would be generated by a compiler. Partial evaluation of boolean expressions is not permitted. Assume the usual rules of precedence of the operators.$(a+b) > (c+d) \text{ or } a > c \text{ and }b < d$
Write $3$ address intermediate code (quadruples) for the following boolean expression in the sequence as it would be generated by a compiler. Partial evaluation of boolea...
go_editor
2.7k
views
go_editor
asked
Apr 24, 2016
Compiler Design
gate1992
compiler-design
syntax-directed-translation
intermediate-code
descriptive
+
–
43
votes
5
answers
1727
GATE CSE 2003 | Question: 74
The following program fragment is written in a programming language that allows global variables and does not allow nested declarations of functions. global int i=100, j=5; void P(x) { int i=10; print(x+10); i=200; j=20; print (x); } main() {P(i ... by name parameter passing mechanism, the values printed by the above program are $115, 220$ $25, 220$ $25, 15$ $115, 105$
The following program fragment is written in a programming language that allows global variables and does not allow nested declarations of functions.global int i=100, j=5...
go_editor
13.0k
views
go_editor
asked
Apr 24, 2016
Compiler Design
gatecse-2003
programming
compiler-design
parameter-passing
runtime-environment
normal
+
–
29
votes
4
answers
1728
GATE CSE 2007 | Question: 79
Consider the CFG with $\left\{S, A, B\right\}$ as the non-terminal alphabet, $\{a, b\}$ as the terminal alphabet, $S$ as the start symbol and the following set of production rules: $S \rightarrow aB$ $S \rightarrow bA$ $B \rightarrow b$ ... $B \rightarrow aBB$ $S \rightarrow bAA$ For the string $aabbab$, how many derivation trees are there? $1$ $2$ $3$ $4$
Consider the CFG with $\left\{S, A, B\right\}$ as the non-terminal alphabet, $\{a, b\}$ as the terminal alphabet, $S$ as the start symbol and the following set of product...
go_editor
8.5k
views
go_editor
asked
Apr 23, 2016
Compiler Design
gatecse-2007
compiler-design
grammar
normal
+
–
42
votes
3
answers
1729
GATE CSE 2012 | Question: 53
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$. $\varepsilon$ is the empty string, \$ indicates end of input, and, $ ... $ E2 : B \rightarrow S, S \rightarrow \varepsilon$ $ E3 : B \rightarrow S$
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...
go_editor
17.4k
views
go_editor
asked
Apr 21, 2016
Compiler Design
normal
gatecse-2012
compiler-design
parsing
+
–
16
votes
3
answers
1730
GATE CSE 2013 | Question: 49
The following code segment is executed on a processor which allows only register operands in its instructions. Each instruction can have atmost two source operands and one destination operand. Assume that all variables are dead after this code segment. ... without any spill to memory? Do not apply any optimization other than optimizing register allocation. 3 4 5 6
The following code segment is executed on a processor which allows only register operands in its instructions. Each instruction can have atmost two source operands and on...
go_editor
6.9k
views
go_editor
asked
Apr 21, 2016
Compiler Design
out-of-syllabus-now
gatecse-2013
normal
compiler-design
target-code-generation
code-optimization
+
–
2
votes
1
answer
1731
S-> iEtSS'|a S-> eS|epsilon E->b
The LL(1) parsing table for the above grammar is Nonterminal a b e i t ... WHY we always choose S' ->eS production to remain in this parse table why not S' -> epsilon? Answer this..???
The LL(1) parsing table for the above grammar is Nonterminalabeit$SS->a S->iEtSS' S' S' ->epsilonS' ->es S'->epsilonE E->b By looking the parse table we found mult...
Ashwani Kumar 2
13.2k
views
Ashwani Kumar 2
asked
Apr 20, 2016
Compiler Design
compiler-design
parsing
ll-parser
ambiguous-grammar
+
–
2
votes
2
answers
1732
S-->A|B A-->a|epsilon B-->b|epsilon Is this grammar LL(1) ??
Ashwani Kumar 2
2.2k
views
Ashwani Kumar 2
asked
Apr 18, 2016
Compiler Design
compiler-design
grammar
parsing
ll-parser
+
–
6
votes
7
answers
1733
Number of conflict
Consider the grammar given below S⟶ SS | a | ∈ The number of inadequate states in the DFA of LR(1) items is (a) 1 (b) 2 (c) 3 (d) 4
Consider the grammar given belowS⟶ SS | a | ∈The number of inadequate states in the DFA of LR(1) items is(a) 1 (b) 2 (c) 3 (d) 4
srestha
7.3k
views
srestha
asked
Apr 16, 2016
Compiler Design
compiler-design
grammar
parsing
lr-parser
+
–
0
votes
1
answer
1734
Basics Compiler
In each activation of a procedure , the local variables names in that procedure is bound to ----------- storage location ? 1) Diff 2) same 3) None
In each activation of a procedure , the local variables names in that procedure is bound to - storage location ?1) Diff2) same3) None
Dexter
6.1k
views
Dexter
asked
Apr 12, 2016
Compiler Design
compiler-design
activation-record
+
–
0
votes
1
answer
1735
Binding
After the assignment pi=3.14 if the storage address 200 associated with varaible pi is used , then the assignment changes 1) Enviorment 2) state c) binding d) none As far as i know Binding happen at run time . Now whenever we declare a variable we are binding ... Enviorment . Now assigning the value to this variable is a state . So now after assignment the STATE would changes . am i right ?
After the assignment pi=3.14 if the storage address 200 associated with varaible pi is used , then the assignment changes1) Enviorment2) statec) bindingd) noneAs far as i...
Dexter
4.0k
views
Dexter
asked
Apr 12, 2016
Compiler Design
compiler-design
runtime-environment
+
–
1
votes
1
answer
1736
Compilers
System programs such as Compiler are designed so that they are 1) Recursive 2) Serially usable 3) Non reusable 4) Reenterable Please provide explanation too
System programs such as Compiler are designed so that they are1) Recursive2) Serially usable3) Non reusable4) ReenterablePlease provide explanation too
Dexter
2.0k
views
Dexter
asked
Apr 12, 2016
Compiler Design
compiler-design
runtime-environment
+
–
1
votes
1
answer
1737
Lexical analysis
Which of the following statement is true For lexical analysis ? a) Simplify the phases b) Compiler effeciency improved c) Portability is encahnced d)compiler work faster
Which of the following statement is true For lexical analysis ?a) Simplify the phasesb) Compiler effeciency improvedc) Portability is encahncedd)compiler work faster
Dexter
1.6k
views
Dexter
asked
Apr 12, 2016
Compiler Design
compiler-design
lexical-analysis
+
–
1
votes
2
answers
1738
HASH TABLES
Hash tables can contribute to the following problems except 1) Counting distinct values 2) Dynamiic dictonary 3) Symbol table look up 4) Range search
Hash tables can contribute to the following problems except1) Counting distinct values2) Dynamiic dictonary3) Symbol table look up4) Range search
Dexter
2.0k
views
Dexter
asked
Apr 12, 2016
Compiler Design
compiler-design
symbol-table
+
–
0
votes
1
answer
1739
ICG
In backpatching , what does the N mean in semantic rule for syntax rule ? 1.E1 or NE2 2.E1 and NE2 3.Not E1 a) It refer to the index of the first statement of second expression b) It refer to the index of the first statement of first expression c) it refer to the merging of list of 2 statements of 2 expression d) it refer to creation of index of 2 statement
In backpatching , what does the N mean in semantic rule for syntax rule ?1.E1 or NE22.E1 and NE23.Not E1a) It refer to the index of the first statement of second expres...
Dexter
476
views
Dexter
asked
Apr 12, 2016
Compiler Design
compiler-design
lexical-analysis
+
–
0
votes
1
answer
1740
Runtime Enviorment
Consider the following sentences : 1. Static allocation binding do not change at run time 2. Heap Allocation allocate and deallocate at run time Which of the above is true ?
Consider the following sentences :1. Static allocation binding do not change at run time2. Heap Allocation allocate and deallocate at run timeWhich of the above is true ?...
Dexter
1.1k
views
Dexter
asked
Apr 12, 2016
Compiler Design
compiler-design
static-allocation
+
–
Page:
« prev
1
...
53
54
55
56
57
58
59
60
61
62
63
...
68
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register