Pointers MCQ q.No-7

Please explain QuesNo-7 .
I am not getting it .

it is the sum of diagonals
see

  • (arr+i)
    arr is the address of the first element, each increment moves it to the next row
    so *(arr + i) is the address of the ith row
    now *(arr+i)+i is the address of the ith col of the ith row
    and ((arr+i) +i) is the value of the element of the ith row at ith column

hey @ashwani225 if your doubt is solved, please mark it as resolved

@ashwani225 hey, if your doubt is solved
please mark it as resolved