Home / C Programming / Floating Point Issues :: Discussion

Discussion :: Floating Point Issues

  1. If the binary eauivalent of 5.375 in normalised form is 0100 0000 1010 1100 0000 0000 0000 0000, what will be the output of the program (on intel machine)?

     #include
     #include<math.h></span> 
      int main() 
      {   
         float a=5.375;  
         char *p;     
         int i;  
         p = (char*)&a;   
         for(i=0; i3; i++)          
           printf("x\n", (unsigned char)p[i]); 
         return 0; } 
    

  2. A.

    40 AC 00 00

    B.

    04 CA 00 00

    C.

    00 00 AC 40

    D.

    00 00 CA 04

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    No answer description available for this question.


Be The First To Comment