torkell: (Default)
[personal profile] torkell
Pop quiz: what happens when you try to write beyond the end of an array?

Well, in Java the runtime quite rightly throws an ArrayIndexOutOfBoundsException.
In VB 6, assuming you've not disabled array bounds checks you'll get an error rasied.
In C, it'll happily let you scribble over whatever was after the array. Which in this case happened to be the loop variables. No prizes for guessing what happens when i is set to 0 in a loop that goes "for (i=0;i<foo;i++)"...
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

January 2026

S M T W T F S
     123
45678910
11121314151617
18192021222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 7th, 2026 07:33 pm
Powered by Dreamwidth Studios