Guest_imported
New member
- Jan 1, 1970
- 0
Hi ,
I am encountering a queer problem in a c program.
main()
{
double fld1;
fld1=2299595420;
Prinf("\n passed field value is %.0f "
}
It gives an output of value -1995371876. However i want to see the actual value of 299595420.
This works fine if i cange the value to either 129959520 or increase the value to more than 10 digits. I found that it fails to give the assined value only when there are 10 digits with the starting digit as 2.
Can any of you please help as i am using this in a c routine. I have tried using 10.0f etc.
Thanks in advance
Jags
I am encountering a queer problem in a c program.
main()
{
double fld1;
fld1=2299595420;
Prinf("\n passed field value is %.0f "
}
It gives an output of value -1995371876. However i want to see the actual value of 299595420.
This works fine if i cange the value to either 129959520 or increase the value to more than 10 digits. I found that it fails to give the assined value only when there are 10 digits with the starting digit as 2.
Can any of you please help as i am using this in a c routine. I have tried using 10.0f etc.
Thanks in advance
Jags