Let A be a square matrix of size n x n. Consider the following program. What is the expected output?
C = 100
for(i=0; i<n; i++)
for (j=0; j<n; j++)
{
Temp = A[i][j] + C
A[i][j] = A[j][i]
A[j][i] = Temp - C
}
for(i=0; i<n; i++)
for (j=0; j<n; j++)
printf(%d, A[i][j]);
A) Transpose of matrix A
B) The matrix A itself
C) Adding 100 to the upper diagonal elements and subtracting 100 from diagonal elements of A
D) None
My answer is A) Transpose of matrix. But the answer says option B.