convert string to float c

C
char myString = "6.88";
float x = atof(myString);
//x is now 6.88
Source

Also in C: