Re:Ask HN: How does the return statement of a function work?
by version_five on Monday April 10, 2023 @02:34AM
(#35509733)
You may be interested to contrast how it works in python with C. If you have something like
When you compile with gcc you get
This is the behavior it seems like you were expecting, where the array is stored on the stack and so a pointer is invalid once the function ends.
[ Parent
| on HN ]
There are no comments on this comment yet.