+ 2
logic of arrays and loops ?
so i learned arrays and made this int x; int usk[] = { 0, 1, 2, 3}; for (x = 0 ; x < 8 ; x++) { cout << usk[x] << endl; } i know its wrong but whats the logic behind the printed numbers (0 1 2 3 7601948 596681 1 8931488 ? does it matter which compiler you are using?
2 Antworten
+ 14
Just undefined garbage values stored within the system. Compilers do not check whether or not your array iterations are out of bound.
0
All I know is that the only thing a compiler does is run your code it shouldn't matter what one you are using it should output the same thing as anything else