Search
 
SCRIPT & CODE EXAMPLE
 

C

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("
");
}
Comment

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("
");
}
Comment

PREVIOUS NEXT
Code Example
::  
:: bootstrap form 
::  
::  
::  
C ::  
::  
:: bubble sort 
::  
::  
::  
::  
::  
::  
::  
C ::  
::  
::  
:: C How to define a union? 
C ::  
::  
::  
::  
C ::  
::  
C ::  
::  
::  
::  
C ::  
ADD CONTENT
Topic
Content
Source link
Name
3+6 =