In accessing array elements I have long been using syntax like arrayname[index]. However I saw this syntax 'index[array name]' in a program. It does compiles, giving output '3'. But is it a right or wrong syntax?
int arr[5] = {1,2,3,4,5};
cout << 2[arr] << '\n';
I can't find explanation of such thing in previous posts or elsewhere so I open up this post. Thank you.