On 07/08/2010 13:45, simendsjo wrote:

When I do the same with a static array, I get 0. But this is just
actually garbage, right? It might contain other data, and not always 0?

Yes. It's entirely undefined what will happen, you might find that the extra bit of memory you try and access is a non readable page which will give you a seg fault or it could be any random chunk of data depending on how the executable gets linked.

--
My enormous talent is exceeded only by my outrageous laziness.
http://www.ssTk.co.uk

Reply via email to