It gives error because the pointer p is of type void and cannot hold any value.
So, we have to type cast the pointer variable from one type to other type.
The statement (int *) p makes p to become an integer type.
#include < stdio.h>
#include < conio.h>
main()
{
int x = 27;
void *p;
p= &x;
printf (“value is = %d”, * ((int *)p));
}
Value is 27