This is because each pointer has its scalar value. If a pointer is declared as void, it can't be de-referenced.
I would like to share a piece of code for the same:
#include <stdio.h>
int main ()
{
int a[5] = { 1, 2, 3, 4, 5};
void *ptr = a;
printf ("%d", *ptr);
return 0;
}
When I compile above code, compiler throws "error: invalid use of void expression".
But you change type of ptr from void to int, it works.
#include <stdio.h>
int main ()
{
int a[5] = { 1, 2, 3, 4, 5};
int *ptr = a;
printf ("%d", *ptr);
return 0;
}