How can I know which type(int, double, float etc..) is currently holding of void pointer? Suppose
void *p;
int x=10;
p=&x;
printf("%s",type_of_void_pointer(p));
double d=1.5;
p=&d;
printf("%s",type_of_void_pointer(p));
The first printf should print "int" whereas second should print "double" Is there any way to write type_of_void pointer function?