Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Search results for compiler
54
votes
4
answers
21
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 (S3) An implied accumulator register Either $S1$ or $S2$ Either $S2$ or $S3$ Only $S2$ and $S3$ All of $S1$, $S2$ and $S3$
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...
makhdoom ghaya
19.0k
views
makhdoom ghaya
asked
Feb 12, 2015
Compiler Design
gatecse-2015-set1
compiler-design
intermediate-code
normal
+
–
21
votes
7
answers
22
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
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...
Arjun
17.4k
views
Arjun
asked
Feb 18, 2021
Compiler Design
gatecse-2021-set2
compilation-phases
compiler-design
1-mark
+
–
41
votes
7
answers
23
GATE CSE 2008 | Question: 54
Which of the following are true? A programming language which does not permit global variables of any kind and has no nesting of procedures/functions, but permits recursion can be implemented with static storage allocation Multi-level access link (or display) arrangement is ... activation records II and V only I, III and IV only I, II and V only II, III and V only
Which of the following are true?A programming language which does not permit global variables of any kind and has no nesting of procedures/functions, but permits recursio...
Kathleen
21.1k
views
Kathleen
asked
Sep 12, 2014
Compiler Design
gatecse-2008
compiler-design
difficult
runtime-environment
+
–
44
votes
7
answers
24
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.
A canonical set of items is given below$S \to L . R $$Q \to R.$On input symbol $<$ the set hasa shift-reduce conflict and a reduce-reduce conflict.a shift-reduce conflict...
go_editor
25.4k
views
go_editor
asked
Sep 26, 2014
Compiler Design
gatecse-2014-set1
compiler-design
parsing
normal
+
–
53
votes
2
answers
25
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
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 ...
makhdoom ghaya
19.2k
views
makhdoom ghaya
asked
Feb 12, 2015
Compiler Design
gatecse-2015-set1
compiler-design
parsing
normal
viable-prefix
+
–
51
votes
8
answers
26
GATE CSE 2005 | Question: 32
Consider the following C program: double foo (double); /* Line 1 */ int main() { double da, db; //input da db = foo(da); } double foo (double a) { return a; } The above code compiled without any error ... or error some compiler-warnings not leading to unintended results some compiler-warnings due to type-mismatch eventually leading to unintended results compiler errors
Consider the following C program:double foo (double); /* Line 1 */ int main() { double da, db; //input da db = foo(da); } double foo (double a) { return a; }The above cod...
Kathleen
16.4k
views
Kathleen
asked
Sep 22, 2014
Programming in C
gatecse-2005
programming
programming-in-c
compiler-design
easy
+
–
44
votes
3
answers
27
GATE CSE 2011 | Question: 1
In a compiler, keywords of a language are recognized during parsing of the program the code generation the lexical analysis of the program dataflow analysis
In a compiler, keywords of a language are recognized duringparsing of the programthe code generationthe lexical analysis of the programdataflow analysis
go_editor
17.4k
views
go_editor
asked
Sep 29, 2014
Compiler Design
gatecse-2011
compiler-design
lexical-analysis
easy
+
–
100
votes
9
answers
28
GATE CSE 2014 Set 2 | Question: 34
For a C program accessing $\mathbf{X[i] [j] [k]}$, the following intermediate code is generated by a compiler. Assume that the size of an integer is $32$ bits and the size of a character is $8$ bits. t0 = i ∗ 1024 t1 = j ∗ 32 t2 = k ∗ 4 t3 = t1 + t0 t4 ... as "char $\mathbf{X[4] [32] [8]}$ . $\mathbf{X}$ is declared as "char $\mathbf{X[32] [16] [2]}$ .
For a C program accessing $\mathbf{X[i] [j] [k]}$, the following intermediate code is generated by a compiler. Assume that the size of an integer is $32$ bits and the siz...
go_editor
36.4k
views
go_editor
asked
Sep 28, 2014
Compiler Design
gatecse-2014-set2
compiler-design
intermediate-code
programming-in-c
normal
+
–
41
votes
7
answers
29
GATE CSE 2000 | Question: 1.18, ISRO2015-25
The number of tokens in the following C statement is printf("i=%d, &i=%x", i, &i); $3$ $26$ $10$ $21$
The number of tokens in the following C statement isprintf("i=%d, &i=%x", i, &i);$3$$26$$10$$21$
Kathleen
36.8k
views
Kathleen
asked
Sep 14, 2014
Compiler Design
gatecse-2000
compiler-design
compiler-tokenization
easy
isro2015
+
–
67
votes
10
answers
30
GATE CSE 2003 | Question: 16
Which of the following suffices to convert an arbitrary CFG to an LL(1) grammar? Removing left recursion alone Factoring the grammar alone Removing left recursion and factoring the grammar None of the above
Which of the following suffices to convert an arbitrary CFG to an LL(1) grammar?Removing left recursion aloneFactoring the grammar aloneRemoving left recursion and factor...
Kathleen
27.6k
views
Kathleen
asked
Sep 16, 2014
Compiler Design
gatecse-2003
compiler-design
parsing
easy
+
–
26
votes
4
answers
31
GATE CSE 2020 | Question: 9
Consider the following statements. Symbol table is accessed only during lexical analysis and syntax analysis. Compilers for programming languages that support recursion necessarily need heap storage for memory allocation in the run-time environment. Errors violating the condition any ... the above statements is/are TRUE? I only I and III only Ⅱ only None of Ⅰ, Ⅱ and Ⅲ
Consider the following statements.Symbol table is accessed only during lexical analysis and syntax analysis.Compilers for programming languages that support recursion nec...
Arjun
14.7k
views
Arjun
asked
Feb 12, 2020
Compiler Design
gatecse-2020
compiler-design
compilation-phases
runtime-environment
1-mark
+
–
37
votes
3
answers
32
GATE CSE 2008 | Question: 55
An LALR(1) parser for a grammar G can have shift-reduce (S-R) conflicts if and only if The SLR(1) parser for G has S-R conflicts The LR(1) parser for G has S-R conflicts The LR(0) parser for G has S-R conflicts The LALR(1) parser for G has reduce-reduce conflicts
An LALR(1) parser for a grammar G can have shift-reduce (S-R) conflicts if and only ifThe SLR(1) parser for G has S-R conflictsThe LR(1) parser for G has S-R conflictsThe...
Kathleen
16.0k
views
Kathleen
asked
Sep 12, 2014
Compiler Design
gatecse-2008
compiler-design
parsing
normal
+
–
60
votes
3
answers
33
GATE CSE 2008 | Question: 11
Which of the following describes a handle (as applicable to LR-parsing) appropriately? It is the position in a sentential form where the next shift or reduce operation will occur It is non-terminal whose production will be used for reduction in the ... in the next step along with a position in the sentential form where the right hand side of the production may be found
Which of the following describes a handle (as applicable to LR-parsing) appropriately?It is the position in a sentential form where the next shift or reduce operation wil...
Kathleen
13.6k
views
Kathleen
asked
Sep 11, 2014
Compiler Design
gatecse-2008
compiler-design
parsing
normal
+
–
41
votes
6
answers
34
GATE CSE 2008 | Question: 12
Some code optimizations are carried out on the intermediate code because They enhance the portability of the compiler to the target processor Program analysis is more accurate on intermediate code than on machine code The information from ... analysis cannot otherwise be used for optimization The information from the front end cannot otherwise be used for optimization
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...
Kathleen
15.5k
views
Kathleen
asked
Sep 11, 2014
Compiler Design
gatecse-2008
normal
code-optimization
compiler-design
+
–
51
votes
7
answers
35
GATE CSE 2018 | Question: 37
A lexical analyzer uses the following patterns to recognize three tokens $T_1, T_2$, and $T_3$ over the alphabet $\{a, b, c\}$. $T_1: a?(b \mid c)^\ast a$ $T_2: b?(a \mid c)^\ast b$ ... the string $bbaacabc$ is processed by the analyzer, which one of the following is the sequence of tokens it outputs? $T_1T_2T_3$ $T_1T_1T_3$ $T_2T_1T_3$ $T_3T_3$
A lexical analyzer uses the following patterns to recognize three tokens $T_1, T_2$, and $T_3$ over the alphabet $\{a, b, c\}$.$T_1: a?(b \mid c)^\ast a$$T_2: b?(a \mid c...
gatecse
21.5k
views
gatecse
asked
Feb 14, 2018
Compiler Design
gatecse-2018
compiler-design
lexical-analysis
normal
2-marks
+
–
12
votes
4
answers
36
GATE CSE 2021 Set 1 | Question: 50
Consider the following $C$ code segment: a = b + c; e = a + 1; d = b + c; f = d + 1; g = e + f; In a compiler, this code segment is represented internally as a directed acyclic graph $\text{(DAG)}$. The number of nodes in the $\text{DAG}$ is _____________
Consider the following $C$ code segment:a = b + c; e = a + 1; d = b + c; f = d + 1; g = e + f;In a compiler, this code segment is represented internally as a directed acy...
Arjun
10.8k
views
Arjun
asked
Feb 18, 2021
Compiler Design
gatecse-2021-set1
compiler-design
code-optimization
directed-acyclic-graph
numerical-answers
2-marks
+
–
28
votes
5
answers
37
GATE CSE 2010 | Question: 13
Which data structure in a compiler is used for managing information about variables and their attributes? Abstract syntax tree Symbol table Semantic stack Parse table
Which data structure in a compiler is used for managing information about variables and their attributes?Abstract syntax treeSymbol tableSemantic stackParse table
go_editor
14.5k
views
go_editor
asked
Sep 29, 2014
Compiler Design
gatecse-2010
compiler-design
lexical-analysis
easy
+
–
20
votes
4
answers
38
GATE CSE 2019 | Question: 43
Consider the augmented grammar given below: $S’ \rightarrow S$ $S \rightarrow \langle L \rangle \mid id$ $L \rightarrow L, S \mid S$ Let $I_0 = \text{CLOSURE} (\{[S’ \rightarrow \cdot S ]\}).$ The number of items in the set $\text{GOTO} (I_0, \langle \: )$ is______
Consider the augmented grammar given below:$S’ \rightarrow S$$S \rightarrow \langle L \rangle \mid id$$L \rightarrow L, S \mid S$Let $I_0 = \text{CLOSURE} (\{[S’ \rig...
Arjun
17.7k
views
Arjun
asked
Feb 7, 2019
Compiler Design
gatecse-2019
numerical-answers
compiler-design
grammar
2-marks
+
–
36
votes
2
answers
39
GATE CSE 2001 | Question: 1.17
The process of assigning load addresses to the various parts of the program and adjusting the code and the data in the program to reflect the assigned addresses is called Assembly parsing Relocation Symbol resolution
The process of assigning load addresses to the various parts of the program and adjusting the code and the data in the program to reflect the assigned addresses is called...
Kathleen
12.7k
views
Kathleen
asked
Sep 14, 2014
Compiler Design
gatecse-2001
compiler-design
runtime-environment
easy
+
–
39
votes
4
answers
40
GATE CSE 2003 | Question: 58
Consider the translation scheme shown below. $S \rightarrow T\;R$ $R \rightarrow + T \{\text{print}( +');\} R\mid \varepsilon$ $T \rightarrow$ num $\{\text{print}$(num.val)$;\}$ Here num is a token that represents an integer and num.val represents the corresponding integer value. For an ... scheme will print $9 + 5 + 2$ $9 \ 5 + 2 +$ $9 \ 5 \ 2 + +$ $+ + 9 \ 5 \ 2$
Consider the translation scheme shown below.$S \rightarrow T\;R$$R \rightarrow + T \{\text{print}(‘+’);\} R\mid \varepsilon$$T \rightarrow$ num $\{\text{print}$(num....
Kathleen
12.9k
views
Kathleen
asked
Sep 17, 2014
Compiler Design
gatecse-2003
compiler-design
grammar
normal
+
–
Page:
« prev
1
2
3
4
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register