Q. What is the output of the following code snippet? int x = 10; int y = 0; cout << (x || y);
β
Correct Answer: (B)
1
Explanation: The logical OR operator (||) returns true (1) if at least one of the operands is non-zero.