|
|
float f( float x)
{
printBitFloat(x);
float r;
r = x*x;
printBitFloat(r);
return(r);
}
int main(int argc, char *argv[] )
{
int a, b;
a = 2;
printBitInt(a);
b = f(a);
printBitInt(b);
}
|
Output of the program:
a = 2 , repr in bits: 00000000000000000000000000000010 Inp param x = 2.000000 , repr in bits: 01000000000000000000000000000000 Return value = 4.000000 , repr in bits: 01000000100000000000000000000000 b = 4 , repr in bits: 00000000000000000000000000000100 |
How to run the program:
|