Question PSC-BIT-0001
MediumWhat will be printed by the following pseudocode? (& is bitwise AND, ^ is bitwise XOR.)
Integer p = 12, q = 10
Print (p & q) + (p ^ q)
- A.
8
- B.
14
- C.
Sign up free to see the answer and a step-by-step explanation.
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 printed by the following pseudocode? (& is bitwise AND, ^ is bitwise XOR.)
Integer p = 12, q = 10
Print (p & q) + (p ^ q)
8
14
Sign up free to see the answer and a step-by-step explanation.
18
22