Sail E0 Webinar
Question

If the binary equivalent of 5.375 in normalised form is 0100 0000 1010 1100 0000 0000 0000 0000, what would be the output of the following program?


#include<stdio.h>
int main()
{
float a =5.375;
char *p;
int i;
p = (char*)&a;
for(i=0;i<=3;i++)
printf("%02x", (unsigned char)p[i]);
return 0;
}


Options:
A .  40 AC 00 00
B .  04 CA 00 00
C .  00 00 AC 40
D .  00 00 CA 04
Answer: Option C



Submit Your Solution Below and Earn Points !
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers