1 2 3 4 5 6 7 8 9 10 11
#include<stdio.h> #include<stdlib.h> int main() { double flt = 71237.898; char myfloat[50]; sprintf (myfloat, "%f", flt); double f = atof(myfloat); printf("answer is %f",f); return 0; }
1
answer is 71237.898000