Is there a function in C to check if the input is an int, long int, or float? I know C has an isdigit() function, and I can create an isnumeric function as follows:
int isnumeric( char *str )
{
while(*str){
if(!isdigit(*str))
return 0;
str++;
}
return 1;
}
But I was wondering how to create a function that would take a floating point number (as a string) and output a TRUE/FALSE value.
42.00000000000000000000000000a floating point number or an int? And42.00000000000000000000000001?