program 1:
int main()
{
void v=8;
printf("v=%d\n",v);
}
program 2:
int main()
{
void *v=8;
printf("*v=%u\n",*v);
printf("v=%u\n",v);
}
compilation error on program 1:
**error**: variable or field ‘v’ declared void void v=0;
compilation errr on program 2:
**error**:invalid use of void expression printf("%d\n",*v);
Could anybody knows the behaviour of void
and void*
in the above program codes?