The local pointer will be remove after i go out from that scope? or will remain?
Example:
int glb1 = 2;
int main ()
{
int var1 = 0;
fnCall1();
fnCall2();
//at here
}
void fnCall1 ()
{
int tmp1;
tmp1 = 10000;
}
void fnCall2 ()
{
int *ptr1;
ptr1 = &glb1;
*ptr1 = 20;
}
If.. the address for variables:
glb1 0004
var1 0008
tmp1 0012
*ptr1 0012
then will the local pointer is permenant exists? so 0012 value will forever pointing glb1? so the tmp1 value might change?