Sail E0 Webinar
Question


What is the value of p?


1.
#include
2.
using namespace std;
3.
int main()
4.
{
5.
int p;
6.
bool a = true;
7.
bool b = false;
8.
int x = 10;
9.
int y = 5;
10.
p = ((x | y) + (a + b));
11.
cout << p;
12.
return 0;
13.
}
Options:
A .  0
B .  16
C .  12
D .  2
Answer: Option B

None.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers