#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) 12
b) 0
c) 2
d) 16
What is the value of p in the following C++ code snippet?
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
What is the value of p in the following C++ code snippet?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!