Question PSC-BIT-0004
EasyWhat will be the output of the following pseudocode?
Integer a = 12, b = 10
Print a ^ b // ^ is XOR
- A.
14
- B.
6
- C.
Show answer and explanation
Answer: B
1100 XOR 1010 = 0110 = 6.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Bitwise Operators question
What will be the output of the following pseudocode?
Integer a = 12, b = 10
Print a ^ b // ^ is XOR
14
6
Answer: B
1100 XOR 1010 = 0110 = 6.
2
8