hello everyone i have the following program
/////////////////////////////////// #include <stdio.h #include <iostream.h void main () { float x = 1073741855; printf ("%f\n", x); cout << x; } ////////////////////////////////// and the out put on running is as follows 1073741824.000000 1.07374e+09 What i want to know is that why am i not getting the o/p as 1073741855 .There is a difference of 31.What am i doing wrong? ====for those who posted suggestions==== I would not like to change the data type to something else as the float can definitely hold this value And i also did try declaring the value of x as float x=1073741855.0; instead of float x=1073741855; Used the <iostream.h> and <stdio.h> mutually exclusively so that they do not clash with each other It does'nt help and the o/p is still the same. So somebody please HELLLLLLLLLLPPPPPPPPP Thanks everybody. Regards Virindera -- _______________________________________________ Win a ski trip! http://www.nowcode.com/register.asp?affiliate=1net2phone3a ================================================ To subscribe, send email to [EMAIL PROTECTED] with subscribe in subject header To unsubscribe, send email to [EMAIL PROTECTED] with unsubscribe in subject header Archives are available at http://www.mail-archive.com/ilugd%40wpaa.org =================================================