@Sisavknesh: The product of those integers is 122.65625, which is 122
and 21/32. It turns out that the low order 42 bits of the mantissa are
zero. Since numbers on PCs are stored little-endian, and because you
asked for an integer format conversion, the first 32 of those 42 bits
are treated as an integer 0 and are printed as zero.

The reason that no type conversion took place is that type conversions
are not implicit in printf (it is your responsibility to make the
format specifier and the data compatible), and you didn't ask for one,
as in:

printf("%d",(int)3.14*6.25*6.25);

Dave

On Sep 6, 11:25 am, sivaviknesh s <sivavikne...@gmail.com> wrote:
>  printf("%d",3.14*6.25*6.25);
>
> ...ans : 0 ..how and why?? why not type conversion take place??
>
> --
> Regards,
> $iva

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to