C Programming - Floating Point Issues - Discussion
Discussion Forum : Floating Point Issues - General Questions (Q.No. 3)
3.
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<stdio.h>
#include<math.h>
int main()
{
float a=5.375;
char *p;
int i;
p = (char*)&a;
for(i=0; i<=3; i++)
printf("%02x\n", (unsigned char)p[i]);
return 0;
}
Discussion:
117 comments Page 7 of 12.
Nnnn bbbbb said:
1 decade ago
How do we decide whether to use big endian or small endian?
Babu said:
1 decade ago
Hay can anyone please tell me what is memory normalization?
Kiran chowdary said:
1 decade ago
I agree with preeti, but can u tell me where we use this.
Thientran said:
1 decade ago
@Reka: Standard for Floating-Point Arithmetic is Ieee754
Sayan bose said:
1 decade ago
How is hexadecimal operation taking place in a compiler?
Ankit Chandra said:
1 decade ago
Thank you preeti. I really needed that ansswer badly.
Anusha said:
1 decade ago
@amith: the ans is C bcoz it is considered byte wise
Rithvika said:
1 decade ago
Hey can any one tell the procedure of normalisation?
Prabha said:
1 decade ago
Can any one please tel me how to do normalization ?
Surbhi said:
1 decade ago
What do you mean by big endian and little endian ?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers