I beat arrays.

Pages: 12
That is some interesting results. How did a even get touched in all that? And did you happen to find out why b[12] is 12?
The compiler is free to push variables into the stack in any order it wants. VC++ usually maintains the order, but GCC doesn't. GCC prefers to group similar variables together.
Like I said, it's most likely that b+12 == &i. Although answering the question "why do demons fly out of your nose?" with "because they wanted to get some pizza" is rather missing the point.
closed account (o1vk4iN6)
I beat arrays.


arrays + pointers: +1

programmers: 0
Ah so just some compiler tom foolery I guess?
If Aramil was a furry, he'd have his tail between his hind legs by now.

It may be beneficial to watch some of the Stanford University lectures on programming paradigms. Lecture 3 has some info on arrays but it is probably worth starting at lecture 2. Don't bother with lecture 1, it is admin stuff for the course.

Lecture 2 | Programming Paradigms (Stanford)

Lecture 3 | Programming Paradigms (Stanford)
Topic archived. No new replies allowed.
Pages: 12