Sunday, 4 January 2015

Programming Quiz-70



main()
{
signed int bit=512, i=5;

for(;i;i--)
{
printf("%d\n", bit = (bit >> (i - (i -1))));
}
}
 

a. 512, 256, 128, 64, 32
b. 256, 128, 64, 32, 16
c. 128, 64, 32, 16, 8
d. 64, 32, 16, 8, 4
  

Answer: B

No comments:

Post a Comment