Consider the following program modifying an $n \times n$ square matrix $A$:
for i=1 to n:
for j=1 to n:
Which of the following statements about the contents of matrix $A$ at the end of this program must be TRUE?
In executing the code above, an element a[i][j] of Matrix is modified $2-times$, And thus final value of A remains unchanged.
1.for i=1 to n:
2. for j=1 to n:
6. end for
The $3,4,5$ lines swap $A [ j ] [ i ]$ and $A [ i ] [ j ]$.
The same variables are swapped twice. For eg when: $i =5$, $j = 10$. $A  $ and $A  $ will be swapped. They will be swapped again when $i = 10$, $j =5$.
Two times swap of same elements will lead to $A$ remaining unchanged.
Hence, E is correct.
Feedback for next edition (if ever there's...