Time Left - 12:00 mins

GATE CS 2019 - Compiler Design (Runtime Environment ) Quiz-1

Attempt now to get your rank among 525 students!

Question 1

The process of assigning load addresses to the various parts of the program and adjusting the code and date in the program to reflect the assigned addresses is called

Question 2

Consider the following table :

Matching A, B, C, D in the same order gives :

Question 3

Which of the following are true?
I. 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.
II. Multi–level access link (or display) arrangement is needed to arrange activation records only if the programming language being implemented has nesting of procedures/functions.
III. Recursion in programming languages cannot be implemented with dynamic storage allocation.
IV. Nesting of procedures/functions and recursion require a dynamic heap allocation scheme and cannot be implemented with a stack–based allocation scheme for activation records.
V. Programming languages which permit a function to return a function as its result cannot be implemented with a stack–based storage allocation scheme for activation records

Question 4

Consider the program given below, in a block-structured pseudo-language with lexical scoping and nesting of procedures permitted.
Program main;
Var ...
Procedure A1;
Var ...
Call A2;
End A1
Procedure A2;
Var ...
Procedure A21;
Var ...
Call A1;
End A21
Call A21;
End A2
Call A1;
End main.
Consider the calling chain: MainA1A2A21A1
The correct set of activation records along with their access links is given by

Question 5

Given the relations employee (name, salary, deptno), and department (deptno, deptname, address)
Which of the following queries cannot be expressed using the basic relation alalgebra operations (σ,π,×, ,,,)?

Question 6

A variable x is said to be live at a statement Si in a program if the following three conditions hold simultaneously:
i. There exists a statement Sj that uses x
ii. There is a path from Si to Sj in the flow graph corresponding to the program
iii. The path has no intervening assignment to x including at Si and Sj

The variables which are live both at the statementin basic block2 and at the statement in basic block 3 of the above control flow graph are
  • 525 attempts
  • 2 upvotes
  • 11 comments
May 14GATE & PSU CS