This code:
int array1[5] = {1, 30, 90, 40, 3};
char array2[] = {125, '}'};
cout << array1 << endl;
cout << array1[0] << endl;
cout << array1[1] << endl;
cout << array1[2] << endl;
cout << array1[3] << endl;
cout << array1[4] << endl;
cout << array2 << endl;
gives me these results:
0x7fff5fbff450
1
30
90
40
3
}}
What I'm wondering is: Why does array2 output all the elements of the array in order (line10), but when I try it for array1 it gives me an odd code instead of each number in order (line 4). Just wondered.