Consider the two following C++ programs
1 2 3 4 5 6 7 8 9 |
|
1 2 3 4 5 6 7 8 9 |
|
Usually, one would expect them to run typically in the same time. Do they?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Compiler will increment pointer in A case to access linearly stored data. In case b it can't do it. It depends on compiler optimization.