static int to void* c code example Example 1: int to void* c int y = *((int *) pointer); Example 2: int to void* c int x = 10; void *pointer = &x;