UGC NET Dec-2020 and June-2021 Paper-2
December 3, 2023UGC NET Dec-2020 and June-2021 Paper-2
December 3, 2023Question 1087 – Nielit Scientist-B CS 22-07-2017
Let A be a square matrix of size nxn. consider the following program. What is the expected output?
C=100
for i=1 to n do
for j=1 to n do
{
Temp=A[i][j]+C
A[i][j]=A[j][i]
A[j][i]=Temp-C
}
for i=1 to n do
for j=1 to n do
output(A[i][j]);
Correct Answer: A
Question 4 Explanation:
The matrix A itself
Transpose of matrix A
Adding 100 to the upper diagonal elements and subtracting 100 from diagonal elements of A
None of the option
Subscribe
Login
0 Comments