Q114: What is the value of `p` in the following C++... - Programming Language (C++ / JAVA) - Computer Application- ICAR JRF/SRF 2024 | Agrigyan

114
Computer Application- ICAR JRF/SRF 2024
MCQ (Single Correct) +4 −1

What is the value of `p` in the following C++ code snippet? ```cpp #include 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; } ```

1. 12
2. 0
3. 2
4. 16
Official PYQ Papers

Previous Year Papers of Computer Application

Practice official shift-wise question papers with answer keys and detailed explanations on the actual exam pattern.

1
Total Available Previous Papers

Choose Exam

Exam Directory

Browse official Previous papers and mock tests

9 Major Agriculture Exams Available
Prevपिछला Nextअगला