xxxxxxxxxx
int main()
{
// Character array to be parsed
char array[] = "365.25 7.0";
// Character end pointer
char* pend;
// f1 variable to store float value
float f1 = strtof(array, &pend);
// f2 variable to store float value
float f2 = strtof(pend, NULL);
// Printing parsed float values of f1 and f2
printf("%.2f\n%.2f\n", f1, f2);
// Performing operation on the values returned
printf(" One year has %.2f weeks \n", f1 / f2);