[SOLVED] Need help understanding array subscript operator
Let's assume a one dimension int array int array[5] = {1, 2, 3, 4, 5}; To get an element, we can use subscript operator: `array[0]` or `array[1]` Or dereference operator: `*array`, or `*(array + 1)`. And now for the question; 1. How do I obtain value of an element from a two (or more) dimension array by using dereference operator?. 2. For a 2D array case, is swapping of indexes possible using dereference operator? for example, I understand we can use subscript operators such as: `array[row][col]` And we can swap the index such that: `array[col][row]` Is index swapping possible by using dereference operator? if it is, how? is it considered a good practice? * I tried searching for this topic but got overwhelmed by irrelevant results, I'm sorry if this had been discussed before (duplicate links are welcome). Big Thanks for any enlightenment, in advance.