Q. What is the value of z in the following C++ code snippet?
Code:
#include <iostream>
using namespace std;
int main()
{
int z;
bool a = true;
bool b = false;
int x = 10;
int y = 5;
z = ((x | y) + (a + b));
cout << z;
return 0;
}
β
Correct Answer: (D)
16