1
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
2
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
3
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
4
GATE CSE 2005
MCQ (Single Correct Answer)
+1
-0.3
Which one of the following are essential features of an object-oriented programming language?
i) Abstraction and encapsulation
ii) Strictly-typedness
iii) Type-safe property coupled with sub-type rule
iv) Polymorphism in the presence of inheritance
A
(i) and (ii) only
B
(i) and (iv) only
C
(i), (ii) and (iv) only
D
(i), (ii) and (iii) only
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