Page 1 of 1

What is the value of p in the following C++ code?

Posted: Wed Jul 13, 2022 7:51 pm
by answerhappygod
#include <iostream> using namespace std; int main() { int p; bool a = true; bool b = false; int x = 10; int y = 5; p = ((x | y) + (a + b)); cout << p; return 0; }
a) 0
b) 16
c) 12
d) 2