Computer Sciences > GATE 2014 SET-3 > Matrix Operations
Let A be a square matrix of size n x n. Consider the following pseudocode. 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;
}
for i = 1 to n do
for j = 1 to n do
output(A[i][j]);
A
The matrix A itself
B
Transpose of the matrix A
C
Adding 100 to the upper diagonal elements and subtracting 100 from lower diagonal elements of A
D
None of the above

Correct : a

Similar Questions

A palindrome is a word that reads the same forwards and backwards. In a game of words, a player has the following two plates painted with letters. From...
#1 MCQ
Which number does not belong in the series below? 2, 5, 10, 17, 26, 37, 50, 64
#4 MCQ
Choose the word that is opposite in meaning to the word “coherent”.
#5 MCQ

Related Topics

No tags found

Unique Visitor Count

Total Unique Visitors

Loading......