[aclug-L] C problem redux....
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Here's some code that's confusing me:
#include <stdlib.h>
int main()
{
char number[] = {"5.333009"};
double dval;
dval = atof("5.333009");
printf("number: %s\n", number);
printf("number: %lf\n", dval);
}
Here's the output:
number: 5.333009
number: 349440.000000
Where on earth is it getting 349440.000000 ? I get the same results when
I try atof(number). Sunday is an odd day, right?
Larry Bottorff
-- This is the discussion@xxxxxxxxx list. To unsubscribe,
visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi
- [aclug-L] C problem redux....,
Larry Bottorff <=
[aclug-L] Re: C problem redux...., Tom Hull, 2000/03/05
|
|