+ 1

How it works and how it give the answer 3?

int mat[2][2] = {{1,2},{3,4}}; cout<<0[1[mat]];

18th Aug 2020, 6:37 PM
ILLUMINATIE
ILLUMINATIE - avatar
1 Respuesta
+ 6
Suppose `arr` is an array and `n` is a interger then `n[arr]` is same as `arr[n]`. Now adding one more dimension `m` to array; `m[n[arr]]` is same as arr[n][m] in your code `0[1[mat]]` means `mat[1][0]`
18th Aug 2020, 6:54 PM
🇮🇳Omkar🕉
🇮🇳Omkar🕉 - avatar