+ 2
What is the point of this?
Recently I saw one question during challenges wherin there is a 2x2 matrix and you try to print this way int mat[2][2] ={{1,2}{4,5}}; cout << 0[1[mat]] ; output is : 4 it outputs the element (1(0)) EDIT : please redirect me to any documentation to know what is this even called!
5 Réponses
+ 1
Coder Kitten Thanks for this beautiful answer, I was literally tired of searching this everywhere!
0
NotAPythonNinja obviously it would work with N dimentional array Coder Kitten has already explained about the subscript expression. I wonder how many such secret hidden side effects exist, imagine one system tomorrow which is an AI doing some critical stuff and this side effect causes AI to finish off the human race lol.