Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
ROLLNO.______________________
TIME : 55 MIN (50 Min for Answers + 5 Min for Download doc, Mail Back)
Instructions:
A) (+2) correct answer and (-1) wrong answer.
B) For your better knowledge, dont mark options as fluke or dont take Google or any of
your friend help just think about the concept (hidden behind) yourself.
(BE HONEST TO YOURSELF ATLEAST, AS ITS EVERYTHING FOR YOU)
C) You have to mail me back Word document with answers only within time otherwise it
would not be evaluated.
D) Apply logical reasoning wherever you found possibility.
1)
char c=o;
printf ( %d %d , sizeof( c ) , strlen( o ) );
a) 1,1
2)
3)
4)
b) 2,2
c) 1,2
d) 2,1
e) None
printf( %d , - 9 << 2 );
a) 177734
b) 12345
c) 17734
d) Compilation Error
main()
{
int ab,bc,cd,de;
ab=3; bc=5;
cd=ab,bc;
de=( ab,bc );
printf( %d %d , cd , de );
}
a) 3,3
b) 5,3
c) 3,5
d) 5,5
main()
{
unsigned char i= 0x0008;
printf( %d , i << 1);
}
a) 0
b) 256
c)80
d) 100
5) int main()
{
union var
{
int a,b;
}v;
v.a=10;
v.b=20;
printf( %d , v.a);
}
a) 10
b) 20
6) int x,y,z;
y= ( x=1,y=2,z=3 );
printf( %d %d %d ,x,y,z);
a) 1 1 3
b) 1 2 3
c) 30
d) 0
c) 1 0 3
d) 1 3 3
7) How many bytes are occupied by near, far and huge pointers?
a) 2,2,4
b) 2,4,4
c) 2,4,2
d) 2,2,2
8) int x=134;
printf( %f , x );
a) 134.000000
b) 134
c) Compilation Error
9) Which of the following can be used to find the first occurrence of a given string in another?
a) strchr()
b) strrchr()
c) strstr()
d) strnset()
b) 0 0
c) 6 8 11 14
c) 1 0
d) 7 8 11 15
d)
None
printf( %d ,*ptr);
b) 64
c) 0
13) printf( 1 + cd );
a) Garbage
printf( 1 + am );
b) cdam
d) 1
c) %d%c
e) None
d) None(___)
c) -6
d) ERROR : Compilation
e) None
c) NULL
d) Compilation Error
e) 9
b) 8
d) 15
e) None
e) None
c) 9
d) Compile Error
b) Linking Error
d) None Of these
e) None
c) 2 7 2 7
c) Compilation Error
d) 8 7 2 7
d) -3
e) None
Answer : ______________________________________________
printf( %d %d ,i,j ); }
c) 4 to 5
d) ERROR
e) None
c) No output
d) Compile Error
e) None
e) None
printf(Chitkara,scanf(%d %d,&a,&b));
return 0; }
(a) 125
(b) 13
(c) 17
(d) None of above
d) 0 0 0 0
Answer : ____________________
Answer : __________________________________________
Answer : _____________________________________________
38) main()
{
int a[10][20][30]={0};
printf("%ld",&a+1 - &a);
return 0;
}
Answer : ______________________________________