1
GATE CSE 2008
MCQ (Single Correct Answer)
+2
-0.6
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 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

A
II and V only
B
I, III and IV only
C
I, II and V only
D
II, III and V only
2
GATE CSE 2008
MCQ (Single Correct Answer)
+2
-0.6
Choose the correct option to fill ? 1 and ? 2 so that the program below prints an input string in reverse order. Assume that the input string is terminated by a newline character.
void recerse (void) {
  int c;
  if (?1) reverse() ;
  ?2
}
main {
  printf ("Enter Text" ); 
  printf("\n");
  reverse() ;
  printf("\n") ;
}
A
?1 is (getchar ( )! = '\ n')
?2 is getchar (c);
B
?1 is ((c = getchar ( ) )! = '\ n')
?2 is getchar (c);
C
?1 is (c ! = '\ n')
?2 is putchar (c);
D
?1 is ((c = getchar ( ) )! = '\ n')
?2 is putchar (c);
3
GATE CSE 2008
MCQ (Single Correct Answer)
+2
-0.6
What is printed by the following C program?
#include < stdio.h >
int f(int x, int *py, int **ppz)
{
   int y, z;
  **ppz += 1; 
   z  = **ppz;
  *py += 2;
   y = *py;
   x += 3;
   return x + y + z;
}
 
void main()
{
   int c, *b, **a;
   c = 4;
   b = &c;
   a = &b; 
   printf( "%d", f(c,b,a));
   getchar();
}
A
18
B
19
C
21
D
22
4
GATE CSE 2008
MCQ (Single Correct Answer)
+2
-0.6
Given below are two finite state automata ($$ \to $$ indicates the start state and $$F$$ indicates a final state) GATE CSE 2008 Theory of Computation - Finite Automata and Regular Language Question 43 English 1 GATE CSE 2008 Theory of Computation - Finite Automata and Regular Language Question 43 English 2

Which of the following represents the product automation $$ZY$$?

A
GATE CSE 2008 Theory of Computation - Finite Automata and Regular Language Question 43 English Option 1
B
GATE CSE 2008 Theory of Computation - Finite Automata and Regular Language Question 43 English Option 2
C
GATE CSE 2008 Theory of Computation - Finite Automata and Regular Language Question 43 English Option 3
D
GATE CSE 2008 Theory of Computation - Finite Automata and Regular Language Question 43 English Option 4
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12