I am studying how to display elements of 2D array with the help of pointers. Here is the code I tried:
#include<stdio.h>
int main(){
int arr[3][2] = {
{7, 8},
{6,3},
{3,4}
};
printf("%u\n", (arr + 2));
printf("%u\n", *(arr + 2));
}
Output:
6487616
6487616
I am expecting output of *(arr + 2) to be 3. How is it the same as (arr + 2)?