Original Post
Why this works, when it shouldn't (atleast i think so):
char* do_something()
{
char t[101];
.. // do something with string t
return &t
}
Now i am creating object t in scope of this function, also i am returning at the end of the function. Shouldn't object t be destroyed after the exit from the function (just after return)?