The size of void pointer varies system to system. If the system is 16-bit, size of void pointer is 2 bytes. If the system is 32-bit, size of void pointer is 4 bytes. If the system is 64-bit, size of void pointer is 8 bytes.
Here is an example to find the size of void pointer in C language,
Example
#include <stdio.h> int main() { void *ptr; printf("The size of pointer value : %d", sizeof(ptr)); return 0; }
Output
The size of pointer value : 8
In the above example, a void type pointer variable is created and by using sizeof() function, the size of void pointer is found out.
void *ptr; printf("The size of pointer value : %d", sizeof(ptr));