Answers for "converting float into string in c"

C
0

c float to string

#include <stdio.h>
int main()
{
   float f = 1.123456789;
   char c[50]; //size of the number
    sprintf(c, "%g", f);
    printf(c);
    printf("\n");
}
Posted by: Guest on March-18-2021
0

c convert float to string

#include <stdio.h>
int main()
{
   float f = 1000;
   char c[50]; //size of the number
    sprintf(c, "%g", f);
    printf(c);
    printf("\n");
}
Posted by: Guest on March-18-2021

Code answers related to "converting float into string in c"

Code answers related to "C"

Browse Popular Code Answers by Language