#include <stdio.h>
#include <stdlib.h>

int main()

char a[] = "123.4";

float   b ;

b = atof(a) ;    /*****  atoi returns intergers ****/

printf (" string is %s   float is %f ", a, b );

return 0 ;

}

Return to previous page.