void main()
{
int var;
void *ptr=&var;
*ptr=5;
printf("%d\n%d\n",var,*ptr);
}
Because you take pointer variable as a integer as *P (which stores the data present in the address), and assign a value as *P=1;
so when you print the *P it gives the result as 1;