SUBNET Solutions Interview Question

How stack allocated memory gets affected when the pointer is returned from the function.