Sample.c:
#include<stdio.h>
#include<stdlib.h>
main()
{
char str[10] = "111.1";
float f = (float)atof(str);
printf ("\n (%s , %f) \n",str,f);
}
Output of above code is : (111.1 , 111.099998)
Please suggest whether i am missing something. Thanks in advance.