Question DSA-BIT-0007
EasyWhat is x ^ x for any integer x?
- A.
2x
- B.
x
- C.
Show answer and explanation
Answer: C
Every bit is XORed with itself, giving 0.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Bit Manipulation question
What is x ^ x for any integer x?
2x
x
Answer: C
Every bit is XORed with itself, giving 0.
0
1