Question: how to do atof in c?
Answer: #include <stdio.h>
#include <stdlib.h>
int main()
{
char a[10] = "3.14";
float pi = atof(a);
printf("Value of pi = %f\n", pi);
return 0;