There are a number of possibilities:
if (1 == sscanf(data,"%f",&F))
conversion OK
else
conversion failed
OR
F = atof(data)
or (better)
F = strtod(data,&end);
The strtod provides error values when the data is out of range, or just wrong. Look at the manual page for that.
HTH
Pieter