Question : c float to string
Answered by : vastemonde
#include <stdio.h>
int main()
{ float f = 1.123456789; char c[50]; //size of the number sprintf(c, "%g", f); printf(c); printf("\n");
}
Source : | Last Update : Thu, 25 Mar 21
Question : c convert float to string
Answered by : sameeraz
#include <stdio.h>
int main()
{ float f = 1000; char c[50]; //size of the number sprintf(c, "%g", f); printf(c); printf("\n");
}
Source : | Last Update : Thu, 25 Mar 21