Runtime Environment

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?
A
OUT(S1) = IN (S2)
B
OUT (S1) = IN (S1) \cup USE (S1)
C
OUT (S1) =IN (S2) \cup OUT (S2)
D
OUT (S1) = USE (S1)\cup IN (S2)
GATE CSE 2021 SET-2   Compiler Design
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?
A
S1 is true and S2 is false
B
S1 is false and S2 is true
C
S1 is true and S2 is true
D
S1 is false and S2 is false
GATE CSE 2021 SET-1   Compiler Design
Question 3
Which of the following comparisons between static and dynamic type checking incorrect?
A
Dynamic type checking slows down the execution
B
Dynamic type checking offers more flexibility to the programmers
C
In contrast to Static type checking, dynamic type checking may cause failure in runtime due to type errors
D
Unlike static type checking dynamic type checking is done during compilation
ISRO CSE 2018   Compiler Design
Question 4
simple two-pass assembler does which of the following in the first pass:
A
Checks to see if the instructions are legal in the current assembly mode
B
It allocates space for the literals.
C
It builds the symbol table for the symbols and their values.
D
All of these
ISRO CSE 2016   Compiler Design
Question 5
Match thefollowing:
A
P\leftrightarrowi, Q \leftrightarrow ii, R\leftrightarrow iv,S\leftrightarrow iii
B
P\leftrightarrow iii, Q\leftrightarrowi, R\leftrightarrow ii, S\leftrightarrow iv
C
P\leftrightarrow ii, Q\leftrightarrow iii, R\leftrightarrow i, S\leftrightarrow iv
D
P\leftrightarrow iv,Q\leftrightarrow i, R\leftrightarrow ii, S\leftrightarrow iii
GATE CSE 2016 SET-2   Compiler Design
Question 6
Which of the following is NOT represented in a subroutine's activation record frame for a stack-based programming language?
A
Values of local variables
B
Return address
C
Heap area
D
Information needed to access non local variables
ISRO CSE 2014   Compiler Design
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.
A
1 and 2 only
B
2 and 3 only
C
3 and 4 only
D
1 and 3 only
GATE CSE 2014 SET-3   Compiler Design
Question 8
Which one of the following is NOT performed during compilation?
A
Dynamic memory allocation
B
Type checking
C
Symbol table management
D
Inline expansion
GATE CSE 2014 SET-2   Compiler Design
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
A
A
B
B
C
C
D
D
GATE CSE 2012   Compiler Design
Question 10
In compiler terminology reduction in strength means
A
Replacing run time computation by compile time computation
B
Removing loop invariant computation
C
Removing common subexpressions
D
replacing a costly operation by a relatively cheaper one
ISRO CSE 2011   Compiler Design
There are 10 questions to complete.

3 thoughts on “Runtime Environment”

Leave a Comment

Like this FREE website? Please share it among all your friends and join the campaign of FREE Education to ALL.