1
GATE CSE 2015 Set 2
MCQ (Single Correct Answer)
+1
-0.3
Consider the following function written in the C programming language.
void foo(char *a){
 if ( *a && *a != ' '){
     foo(a+1);
     putchar(*a);
   }
}
The output of the above function on input “ABCD EFGH” is
A
ABCD EFGH
B
ABCD
C
HGFE DCBA
D
DCBA
2
GATE CSE 2015 Set 3
MCQ (Single Correct Answer)
+1
-0.3
Consider the following C program segment.
#include < stdio.h >
int main()
{
    char s1[7] = "1234", *p;
    p = s1 + 2;
   *p = ‘0’;
    printf("%s", s1);
}
What will be printed by the program?
A
12
B
120400
C
1204
D
1034
3
GATE CSE 2012
MCQ (Single Correct Answer)
+1
-0.3
What will be the output of the following C program segment?
Char inchar = 'A';
Switch ( inchar ) {
case 'A' : printf ("Choice A\ n") ;
case 'B' :
case 'C' : printf (“Choice B”) ;
case 'D' :
case 'E' :
default : printf ( " No Choice" ) ; }
A
No Choice
B
Choice A
C
Choice A
Choice B No Choice
D
Program gives no output as it is erroneous
4
GATE CSE 2005
MCQ (Single Correct Answer)
+1
-0.3
An Abstract Data Type (ADT) is
A
same as an abstract class
B
a data type that cannot be instantiated
C
a data type for which only the operations defined on it can be used, but none else
D
all of the above
GATE CSE Subjects
Software Engineering
Web Technologies
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12