I'm trying to understand how c variables are stored and deleted...
I tought that a variable created in a function was erased after the function stop to work.
But I think i'm wrong because of a code I'm studing like this:
Now "x" points to "y", but wasn't "y" erased after function execution?Code:... item *function(int a, int b, int c){ item *y; ... return y; } int main(){ item *x; ... x=function(a,b,c); ... return 0; }
I don't know if I explained well what I don't understand... I hope someone could help me.
Thanks in advance