Time Left - 12:00 mins

GATE CS 2019 - Compiler Design (Runtime Environment ) Quiz-2 (App update required to attempt this test)

Attempt now to get your rank among 456 students!

Question 1

Consider a program P that consists of two source modules M1 and M2 contained in two different files. If M1 contains a reference to a function defined in M2 the reference will be resolved at

Question 2

Match the following objects to the storage they use in memory:

Question 3

How many times the activation record of the functions will be pushed – poped onto the stack for the execution of the following program?

int main()

{

int n , b;

printf("Enter the number");

scanf("%d",&n);

b= A(n);

printf("%d",b);

return 0;

}

A(int n)

{

if(n==1)

return 1;

else

return 1+A(n/2);

}

Where the value of n is entered as 512

Question 4

Which of the following pointer is used to point to the current activation record?

Question 5

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 6

Consider the following parse tree for the expression a#b$c$d#e#f, involving two binary operators $ and #.

Which one of the following is correct for the given parse tree?
  • 456 attempts
  • 0 upvotes
  • 2 comments
Jun 25GATE & PSU CS