C Language - Operators

You Are Here :: Home > C Language > Operators - General Questions

 
49.

What will be printed as the result of the operation below:

main()
{
int x=20,y=35;
x=y++ + x++;
y= ++y + ++x;
printf("%d%dn",x,y);
}

A. 5974 B. 5794
C. 5479 D. 5497




50.

void main()
{
int i=i++,j=j++,k=k++;
printf("%d%d%d",i,j,k);
}

A. 1 2 B. 0 0 0
C. prints nothing D. garbage value




51.

main()
{
unsigned int i=10;
while(i-->=0)
printf("%u ",i);
}

A. 10 9 8 7 6 5 4 3 2 1 0 65535 65534... B. 10 9 8 7 6 5 4 3 2 1 6 5555 655555...
C. 10 9 8 7 6 5 4 3 2 1 6 5535 655356... D. 10 9 8 7 6 5 4 3 2 1 0 65555 65555...




52.

What will be output :

void main()
{
float a= -3.3f;
int i;
unsigned char *p=&a;
for(int i=0;i<4;i++)
{
printf("%d ",*p);
p++;
}
}

A. 52 83 83 192 B. 52 52 52 192
C. 52 52 83 192 D. 52 52 83 83




53.

#include
void main(){
int a=5,b=10,c=1;
if(a&&b>c){
printf("cquestionbank");
}
else{
break;
}
}
Choose all that apply:

A. cquestionbank B. It will print nothing
C. Run time error D. Compilation error




« previous

1

2

3

4

5

6

8

9

 
 
 



© 2013 freshersindia.in ® | Copyrights | Terms & Conditions
   Designed by Freshers India
Catch Us on