void* ptr = malloc(sizeof(char));*(char*)ptr = ‘A’;printf(“%c\n”, *(char*)ptr);
void* ptr = malloc(sizeof(int));*(int*)ptr = 42;printf(“%d\n”, *(int*)ptr);
int* intValue = malloc(sizeof(int));void* voidPtr = (void*)intValue;
void (*funcPtr)() = &myVoidFunction;(*funcPtr)();
Indian Institute of Embedded Systems – IIES