UGC NET Dec-2020 and June-2021 Paper-2
December 3, 2023
UGC NET Dec-2020 and June-2021 Paper-2
December 3, 2023
UGC NET Dec-2020 and June-2021 Paper-2
December 3, 2023
UGC NET Dec-2020 and June-2021 Paper-2
December 3, 2023

Question 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: 
A
The matrix A itself
B
Transpose of matrix A
C
Adding 100 to the upper diagonal elements and subtracting 100 from diagonal elements of A
D
None of the option
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!