This Test Consists of 50 Questions - The Set Code For This Paper Is D
This Test Consists of 50 Questions - The Set Code For This Paper Is D
This Test Consists of 50 Questions - The Set Code For This Paper Is D
(a) semicolon
(b) colon
(c) period
(d) exclamation mark
x=sqr(a);
return(x);
(a) 7
(b) 0
(c) 1
(d) 6
(a) 15
(b) 0
(c) 16.1
(d) 29
10. Which of the following represents true statement either x is in the range of 10
and 50 or y is zero
(b) for(;;)
{
...
}
(c) x=0;
do{
/*x unaltered within the loop*/
.....}
while(x = = 0);
(a) 3
(b) 1
(c) 0
(d) 2
13. How does the C compiler interpret the following two statements
p=p+x;
q=q+y;
(a) p=p+x;
q=q+y
(b)p=p+xq=q+y
(c)p=p+xq;
q=q+y
(d)p=p+x/q=q+y
For questions 14,15,16,17 use the following alternatives
a.int
b.char
c.string
d.float
14. '9'
16. 10e05
17. 15
(a) 200
(b) 1
(c) -1
(d) 50
(a)20
(b)8
(c)9
(d)21
To access the 6th element of the array which of the following is incorrect?
(a) *(a+5)
(b) a[5]
(c) pa[5]
(d) *(*pa + 5}
(a) 8,9
(b) 9,9
(c) 8,8
(d) 8,unpredictable value
(a) a=b=3=4;
(b) a=b=c=d=0;
(c)float a=int b=3.5;
(d)int a; float b; a=b=3.5;
(b) if cond 1
if cond 2
if cond 3
exp 1;
else exp 2;
else exp 3;
else exp 4;
(d) if cond 3
exp 1;
else if cond 2 exp 2;
else if cond 3 exp 3;
else exp 4;
(a) **
(b) ^
(c) %
(d) not available
(a) a+=b
(b) a*=b
(c) a>>=b
(d) a**=b
y=5;
if (x==10)
else if(x==9)
else y=8;
(a)9
(b)8
(c)6
(d)7
29. a=0;
while(a<5)
printf("%d\\n",a++);
How many times does the loop occurs?
(a)infinite
(b)5
(c)4
(d)6
for (i=0;i=10;i+=2)
printf("Hi\\n");
(a)10
(b) 2
(c) 5
(d) None of these
main()
{unsigned int i=10;
while(i>=0){
printf("%u",i)
i--;}
}
(a)10
(b)9
(c)11
(d)infinite
(a) malloc()
(b) calloc()
(c) free()
(d) realloc()
main(){
int a[5]={1,3,6,7,0};
int *b;
b=&a[2];
}
The value of b[-1] is
(a) 1
(b) 3
(c) -6
(d) none
(a) 8
(b) 6
(c) 7
(d) None
int n,sum=1;
switch(n){
case 2:sum=sum+2;
case 3:sum*=2;
break;
default:sum=0;}
(a) 0
(b) 6
(c) 3
(d) None of these
1.if(c=1)
2.if(c!=3)
3.if(a<b)then
4.if(c==1)
(a) 1 only
(b) 1&3
(c) 3 only
(d) All of the above
(a) %d
(b) %o
(c) %x
(d) %u
40. Find the output of the following program
main(){
int x=5, *p;
p=&x
printf("%d",++*p);
}
(a) 5
(b) 6
(c) 0
(d) none of these
main(){
int i=3,x;
while(i>0){
x=func(i);
i--; }
(a) 6
(b) 8
(c) 1
(d) 3