i was wondering why this function doesn't lead to a complile error:
int *funct()
{
int c=5;
int *b;
b=&c;
return (b);
}
how can it return b if the variable c is destroyed when the function returns?
furthermore, when it returns, the program can manipulate the value of c
which shouldn't even exist...
thanks for help
p.s
it won't compile if you try it with a reference...