Question 47 of 65Pseudocodepseudocode bitwise

What will be the output of the following pseudocode? Values printed in the loop appear on one line, separated by spaces.

Note: ^ is bitwise XOR
Integer i, x
Set x = 0
for (each i from 1 to 5)
    x = x ^ i
    Print x
End for

The verified answer and full solution are one login away

Every answer here is machine verified, with a step-by-step solution that teaches the method. Your login also unlocks a 7-question mock preview in the real exam interface.

Log in to see the answer
← Q46Q48 →Attempt the full timed mock