1
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);
2
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
3
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
4
GATE CSE 2008
MCQ (Single Correct Answer)
+2
-0.6
Match the following $$NFAs$$ with the regular expressions they correspond to GATE CSE 2008 Theory of Computation - Finite Automata and Regular Language Question 42 English 1 GATE CSE 2008 Theory of Computation - Finite Automata and Regular Language Question 42 English 2 GATE CSE 2008 Theory of Computation - Finite Automata and Regular Language Question 42 English 3 GATE CSE 2008 Theory of Computation - Finite Automata and Regular Language Question 42 English 4 GATE CSE 2008 Theory of Computation - Finite Automata and Regular Language Question 42 English 5
A
$$P - 2,\,Q - 1,\,R - 3,\,S - 4$$
B
$$P - 1,\,Q - 3,\,R - 2,\,S - 4$$
C
$$P - 1,\,Q - 2,\,R - 3,\,S - 4$$
D
$$P - 3,\,Q - 2,\,R - 1,\,S - 4$$
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12