According to my understanding of the program. It will give compilation
error for the pointer variable's p1 and p2, which is not declared in
the given program code.
If you considered that p1 as ptr1 and p2 as ptr2, the happening in the
Enviornment is as follows,
When we declaring a variable (either it is pointer or not pointer ) the
memory will be alloted for that variable in the memory register. While
allocating the memory the Enviornment will store some maximum or
minimum value in that corresponding alocation as a Garbage Value in
accordance to the Data Type.
So, when we refer to the variable it will interrupt the Memory Register
and fetch the value stored in it, because of this process you can able
to execute the program after correcting the variables as ptr1 and ptr2
instead of p1 and p2 respectively.
And also you should remain that the Function Printf will carry only the
memory address of the variable which is passed to it. It won't carry
the values to execute the fuction.
If any one having Controversy in my explain please mail me your
explaination to