C Programming :: Floating Point Issues
-
What are the different types of real data type in C ?
-
What will you do to treat the constant 3.14 as a long double?
-
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; } -
Which of the following range is a valid long double (Turbo C in 16 bit DOS OS) ?
-
Which statement will you add in the following program to work it correctly?
#include
-
We want to round off x, a float, to an int value, The correct way to do is
-
A float occupies 4 bytes. If the hexadecimal equivalent of these 4 bytes are A, B, C and D, then when this float is stored in memory in which of the following order do these bytes gets stored?
-
What will you do to treat the constant 3.14 as a float?
-
Which of the following statement obtains the remainder on dividing 5.5 by 1.3 ?