search
Log In

Recent questions tagged compiler-design

0 votes
1 answer
1
Which of the following can be accessed by transfer vector approach of linking? External data segments External subroutines Data located in other procedure All of these
asked Apr 2 in Compiler Design Lakshman Patel RJIT 191 views
0 votes
1 answer
2
Consider an $\varepsilon$-tree CFG. If for every pair of productions $A\rightarrow u$ and $A\rightarrow v$ If $\text{FIRST(u)} \cap \text{FIRST(v)}$ is empty then the CFG has to be $LL(1).$ If the CFG is $LL(1)$ then $\text{FIRST(u)} \cap \text{FIRST(v)}$ has to be empty. Both $(A)$ and $(B)$ None of the above
asked Apr 1 in Compiler Design Lakshman Patel RJIT 137 views
0 votes
2 answers
4
In a single pass assembler, most of the forward references can be avoided by putting the restriction on the number of strings/lifereacts. that the data segment must be defined after the code segment. on unconditional rump. that the data segment be defined before the code segment.
asked Mar 31 in Compiler Design Lakshman Patel RJIT 272 views
0 votes
2 answers
5
A linker is given object module for a set of programs that were compiled separately. What information need not be included in an object module? Object mode Relocation bits Names and locations of all external symbols defined in the object module. Absolute addresses of internal symbols.
asked Mar 31 in Compiler Design Lakshman Patel RJIT 144 views
0 votes
3 answers
6
The identification of common sub-expression and replacement of run time computations by compile-time computations is: Local optimization Constant folding Loop Optimization Data flow analysis
asked Mar 31 in Compiler Design Lakshman Patel RJIT 243 views
0 votes
1 answer
8
0 votes
4 answers
9
0 votes
1 answer
10
0 votes
2 answers
12
What is the maximum number of reduce moves that can be taken by a bottom-up parser for a grammar with no epsilon and unit production (i.e.,of type $A\to\epsilon$ and $A \to a)$ to parse a string with $n$ tokens? $n/2$ $n-1$ $2n-1$ $2^n$
asked Mar 30 in Compiler Design Lakshman Patel RJIT 152 views
0 votes
5 answers
13
0 votes
1 answer
14
A system program that combines the separately complied modules of a program into a form suitable for execution assembler linking loader cross compiler load and go
asked Mar 30 in Compiler Design Lakshman Patel RJIT 148 views
0 votes
4 answers
15
1 vote
1 answer
17
Which of the following statements is/are false? $S1$: $LR(0)$ grammar and $SLR(1)$ grammar are equivalent $S2$: $LR(1)$ grammar are subset of $LALR(1)$ grammars $S1$ only $S1$ and $S2$ both $S2$ only None of the options
asked Mar 30 in Compiler Design Lakshman Patel RJIT 298 views
0 votes
1 answer
18
0 votes
1 answer
19
Which of the following statements is/are true in the context of interpreters? $S1$: Interpreters process program according to the logical flow of control through the program. $S2$: Interpreter translates and executes the error-free first instruction before it goes to the second. $S3$: Interpreter ... interpreted languages. Only $S1$ Only $S3$ Only $S1$, $S2$ and $S3$ Only $S1$, $S2$ and $S4$
asked Mar 30 in Compiler Design Lakshman Patel RJIT 236 views
0 votes
1 answer
20
0 votes
5 answers
21
Consider the following statements related to compiler construction: Lexical Analysis is specified by context-free grammars and implemented by pushdown automata. Syntax Analysis is specified by regular expressions and implemented by finite-state machine. Which of the above statement(s) is/are correct? Only I Only II Both I and II Neither I nor II
asked Mar 24 in Compiler Design jothee 329 views
0 votes
3 answers
22
Which of the following statement(s) regarding a linker software is/are true ? A function of a linker is to combine several object modules into a single load module. A function of a linker is to replace absolute references in an object module by symbolic references to locations in other modules. Only I Only II Both I and II Neither I nor II
asked Mar 24 in Compiler Design jothee 134 views
11 votes
4 answers
23
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 variable must be ... of the above statements is/are TRUE? I only I and III only Ⅱ only None of Ⅰ, Ⅱ and Ⅲ
asked Feb 12 in Compiler Design Arjun 2.5k views
8 votes
3 answers
24
Consider the following grammar. $S \rightarrow aSB \mid d$ $B \rightarrow b$ The number of reduction steps taken by a bottom-up parser while accepting the string $aaadbbb$ is___________.
asked Feb 12 in Compiler Design Arjun 2.8k views
4 votes
3 answers
25
Consider the productions $A \rightarrow PQ$ and $A \rightarrow XY$. Each of the five non-terminals $A, P, Q, X$, and $Y$ has two attributes: $s$ is a synthesized attribute, and $i$ is an inherited attribute. Consider the following rules. Rule $1$ ... $1$ is $L$-attributed. Only Rule $2$ is $L$-attributed. Neither Rule $1$ nor Rule $2$ is $L$-attributed.
asked Feb 12 in Compiler Design Arjun 1.6k views
3 votes
3 answers
26
Which one indicates a technique of building cross compilers? Beta cross Canadian cross Mexican cross X-cross
asked Jan 13 in Compiler Design Satbir 577 views
1 vote
5 answers
27
A given grammar is called ambiguous if two or more productions have the same non-terminal on the left hand side a derivation tree has more than one associated sentence there is a sentence with more than one derivation tree corresponding to it brackets are not present in the grammar
asked Jan 13 in Compiler Design Satbir 1.9k views
2 votes
1 answer
28
Which of the following is a type of a out-of-order execution, with the reordering done by a compiler loop unrolling dead code elimination strength reduction software pipelining
asked Jan 13 in Compiler Design Satbir 527 views
2 votes
4 answers
29
In a two-pass assembler, resolution of subroutine calls and inclusion of labels in the symbol table is done during second pass first pass and second pass respectively second pass and first pass respectively first pass
asked Jan 13 in Compiler Design Satbir 589 views
2 votes
2 answers
30
The number of tokens in the following C code segment is switch(inputvalue) { case 1 : b =c*d; break; default : b =b++; break; } $27$ $29$ $26$ $24$
asked Jan 13 in Compiler Design Satbir 553 views
...