Hi guys, Im studying Functions subject and there's something confusing me regarding to local variables and memory managment , what I've understand that after finishing from function execution then all the local variables are vanished -empytted out- , I understand it conceptually -vanished- but what does -vanished- means in termsof memory .. the addresses gets deleted?
Another question, sometimes when I return a local pointer -local pointer means that I defined a pointer in the function itself- and if I want to return this pointer, then an Error Execution pop out because Im returning a pointer .. alothugh the function should return a pointer because its type is to return pointer, what I figured out that because the pointer is locally and Im doing return to that pointer , then it shows an error .. I didn't understand why this error happens ...any help?
from my understanding although that pointer is locally I can return it because return is a function that return whatever things in its argument ..
thanks alot