Your error is here:
*puntero=&var1;
Actually, by declaring the variable this way:
int *puntero=&var;
It is to declare pointer as just, a pointer to a direction that in this case will be that of var, the error you make when doing:
*puntero=&var1;
Since pointer is already a pointer, you do not need to put * again.
Directly, you put:
puntero=&var1;
But it is like saying that the pointer to the pointer content is equal to the address of var1, but since that is not causing the pointer to point to var1, the error occurs when trying to change the value later with:
*puntero=4;
The number that appears in the printf is the result of a variable without a value, it is like when you exceed a vector of characters, the value n + 1 will have an odd symbol and the next and the next one, since you are consulting places of memory completely indifferent to your code (?