adplus-dvertising
frame-decoration

Question

The following 'C' program
 main
 {
 unsigned int num;
 int i;
 scanf("%u",&num);
 for(i=0;i<16;i++)
 printf("%d",(num<<i&1<<15)?1:0);
 }

a.

Prints all even bits from num

b.

Error

c.

Prints binary equivalent of num

d.

none of these

Posted under C Programming

Answer: (c).Prints binary equivalent of num

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. The following 'C' program