Question 1 |
For a statement S in a program, in the context of liveness analysis, the following sets are defined:
USE(S) : the set of variables used in S
IN(S) : the set of variables that are live at the entry of S
OUT(S) : the set of variables that are live at the exit of S
Consider a basic block that consists of two statements, S1 followed by S2. Which one of the following statements is correct?
USE(S) : the set of variables used in S
IN(S) : the set of variables that are live at the entry of S
OUT(S) : the set of variables that are live at the exit of S
Consider a basic block that consists of two statements, S1 followed by S2. Which one of the following statements is correct?
OUT(S1) = IN (S2) | |
OUT (S1) = IN (S1) \cup USE (S1) | |
OUT (S1) =IN (S2) \cup OUT (S2) | |
OUT (S1) = USE (S1)\cup IN (S2) |
Question 1 Explanation:
Question 2 |
Consider the following statements.
S1: The sequence of procedure calls corresponds to a preorder traversal of the activation tree.
S2: The sequence of procedure returns corresponds to a postorder traversal of the activation tree.
Which one of the following options is correct?
S1: The sequence of procedure calls corresponds to a preorder traversal of the activation tree.
S2: The sequence of procedure returns corresponds to a postorder traversal of the activation tree.
Which one of the following options is correct?
S1 is true and S2 is false | |
S1 is false and S2 is true | |
S1 is true and S2 is true | |
S1 is false and S2 is false |
Question 2 Explanation:
Question 3 |
Which of the following comparisons between static and dynamic type checking incorrect?
Dynamic type checking slows down the execution | |
Dynamic type checking offers more flexibility to the programmers | |
In contrast to Static type checking, dynamic type checking may cause failure in runtime due to type errors | |
Unlike static type checking dynamic type checking is done during compilation |
Question 3 Explanation:
Question 4 |
simple two-pass assembler does which of the following in the first pass:
Checks to see if the instructions are legal in the current assembly mode | |
It allocates space for the literals. | |
It builds the symbol table for the symbols and their values. | |
All of these |
Question 4 Explanation:
Question 5 |
Match thefollowing:


P\leftrightarrowi, Q \leftrightarrow ii, R\leftrightarrow iv,S\leftrightarrow iii | |
P\leftrightarrow iii, Q\leftrightarrowi, R\leftrightarrow ii, S\leftrightarrow iv | |
P\leftrightarrow ii, Q\leftrightarrow iii, R\leftrightarrow i, S\leftrightarrow iv | |
P\leftrightarrow iv,Q\leftrightarrow i, R\leftrightarrow ii, S\leftrightarrow iii |
Question 5 Explanation:
Question 6 |
Which of the following is NOT represented in a subroutine's activation record frame for a stack-based programming language?
Values of local variables | |
Return address | |
Heap area | |
Information needed to access non local variables |
Question 6 Explanation:
Question 7 |
Which of the following statements are CORRECT?
1) Static allocation of all data areas by a compiler makes it impossible to implement recursion.
2) Automatic garbage collection is essential to implement recursion.
3) Dynamic allocation of activation records is essential to implement recursion.
4) Both heap and stack are essential to implement recursion.
1) Static allocation of all data areas by a compiler makes it impossible to implement recursion.
2) Automatic garbage collection is essential to implement recursion.
3) Dynamic allocation of activation records is essential to implement recursion.
4) Both heap and stack are essential to implement recursion.
1 and 2 only | |
2 and 3 only | |
3 and 4 only | |
1 and 3 only |
Question 7 Explanation:
Question 8 |
Which one of the following is NOT performed during compilation?
Dynamic memory allocation | |
Type checking | |
Symbol table management | |
Inline expansion |
Question 8 Explanation:
Question 9 |
Consider the program given below, in a block-structured pseudo-language with lexical scoping and
nesting of procedures permitted.

Consider the calling chain: Main \rightarrow A1 \rightarrow A2 \rightarrow A21 \rightarrow A1
The correct set of activation records along with their access links is given by


Consider the calling chain: Main \rightarrow A1 \rightarrow A2 \rightarrow A21 \rightarrow A1
The correct set of activation records along with their access links is given by

A | |
B | |
C | |
D |
Question 9 Explanation:
Question 10 |
In compiler terminology reduction in strength means
Replacing run time computation by compile time computation | |
Removing loop invariant computation | |
Removing common subexpressions | |
replacing a costly operation by a relatively cheaper one |
Question 10 Explanation:
There are 10 questions to complete.
Complier design runtime environment question 12 confused correct option between a and d
In Question number 5 …options are incorrect.(P-iii,Q-iii,R-i,S-iv)
Thank You Rashmi,
We have updated the option.