For that purpose I have written a simple C program for that... It is in github...GitHub Link
Here how it works... First convert your double into a char string named s..
char s[50];
sprintf(s,"%.2f", yo);
Then use my dtype
function to determine the type...
My function will return a single character...You can use it like this...
char type=dtype(s);
//Return types are :
//i for integer
//f for float or decimals
//c for character...
Then you can use comparison to check it... That's it...