News for hackers. Stuff that matters.
Re:Are pointers and arrays equivalent in C? by parse_tree on Tuesday October 27, 2009 @07:37AM (#905228)
EDIT: ugh, this is not working right. I can't figure out how to get the asterisks to not italicize ( I was trying to show an example).

Variables have block scope, but storage duration need not. If you return a pointer to a block of memory allocated within a function, that is not undefined behaviour. If you return a pointer an array declared within the function that is (if you return a pointer to a static array declared within a function that is not). That's the contrast I was trying to point out.

There are no comments on this comment yet.