Question PSC-BIT-0008
EasyWhat will be the output of the following pseudocode?
Integer x = 7
Print x ^ x
- A.
0
- B.
14
- C.
Show answer and explanation
Answer: A
Any number XOR itself is 0.
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 x = 7
Print x ^ x
0
14
Answer: A
Any number XOR itself is 0.
7
1