Skip to content

Beta · Data may be lost.Your data may be reset or lost.

GateBrew
← GATE CSE 2014 Set 3
Questions

Q10

MCQ1 mark, −0.33AlgorithmsEasy

Let AA be the square matrix of size n×nn \times 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 -C;
    }
for i=1 to n do
    for j=1 to n do
        output (A[i][j]);
Sign in to save attempts.

The solution is hidden while you attempt this question. It opens once you check or show the answer.