I dont understand how the element is being accessed here from the matrix using this pointer notation

@vaibhave31 here its counting the sum of diagonal element (principle)
as u r increasing i everytime starting with 0 to 2
array of 0,0 then 1,1 then 2,2

ok, the doubt is clear.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.