GATEverse Practice, past papers & mock tests
GATE 2014 · SET - 3
Programming & Data StructuresArraysmediumMCQ2 marks
Let A be a square matrix of size n x n. Consider the following pseudocode. What is the expected output?
text
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]);
Save your progress

Related Programming & Data Structures PYQs