+ 1
Please explain how this pointer still hold the value of variable a?
5 Respostas
+ 3
SAURAV KUMAR Because ptr is a global variable.
+ 1
SAURAV KUMAR Yes the value of a will destroy but as you know ptr is global variable and it will hold the value of a before destroy the value of a.
You are not destroying the value of ptr anywhere so it will always have the value of a
+ 1
Ohhh... Thank you
+ 1
Now I completely understand... Thanks Martin Taylor
0
But variable a is local to the func . So after finishing the func value of a is destroyed na...