+ 4
HELP ME 🆘❗️❓
8️⃣ or Error? Help! #include <iostream> using namespace std; int main() { int x[2][3] = {{2, 3, 4}, {8, 9, 10}}; cout << x[0][3] << endl; return 0; }
8 Respuestas
+ 3
x[0][0]=2
x[0][1]=3
x[0][2]=4
x[1][0]=8
x[1][1]=9
x[1][2]=10
x[0][3]=error???? 3>length of array!!!
+ 2
8??? o my god🤪
+ 2
output 8!!!!
+ 2
thanks
+ 2
error in program or sololearn playground?
+ 1
Array start from 0
That means x[0][3] is first element and 4th element inside it.
+ 1
Because the way the array maps in memory that result are expected, In memory it simply looks like this
2 3 4 8 9 10
+ 1
It is two dimentional array,and it is error.because [3] is not exists