samedi 25 avril 2015

unusual syntax for accessing array elements? [duplicate]


This question already has an answer here:

I know that when we![enter image description here][1] access an element in an array we use [] for example :

    int arr[2][3]={1,2,3,4,5,6}; 
    arr[1][2];//last element

but i found out that i can use 2[1[arr]] instead of arr[1][2] so how the compile know this trick ?! is this a way as the reduction function?

thanks.


Aucun commentaire:

Enregistrer un commentaire