create void* function and passed diff. type of value like float, int and double after that typecasting on that value in get_value function and action based on types.
void get_value(void* data)
{
printf("Value %f rn", (float)data);
}
int main(void) {
float di = 10.10;
get_value((void *)di);
return 0;
}
New contributor
Amor Way is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.