What will be the output of the following C code? int main() { int i = 11, j = 3; printf("%d\n", i|j); return 0; }
- A.11
- B.12
- C.13
- D.14
Show answer
Answer: A. 11
Binary 1011 | 0011 equals 1011 in binary, which is 11 in decimal.
Answer: A. 11
Binary 1011 | 0011 equals 1011 in binary, which is 11 in decimal.