ISRO exam 2017 – Question 63 with Solution
In this video we are going to discuss another question which was asked in the exam of ISRO
63. What does the following program do when the input is unsigned 16-bit integer?
#include <stdio.h>
main( )
{
unsigned int num; int i;
scanf (“%u”, &num); for ( i = 0; i{16; i++)
{
printf (“%d”, (num {{ i & 1 {{ 15 ) ? 1:0);
}
}
(a) It prints all even bits from num
(b) It prints all odd bits from num
(c) It prints binary equivalent of num
(d) None of the above