Home » C++ Programming » Data Types » Question
  1. What is the value of p?
    #include 
    using namespace std;
    int main()
    {
    int res;
    bool p = false;
    bool q = true;
    int num0 = 15;
    int num1 = 10;
    res = ((num0 | num1) + (p + q));
    cout << res;
    return 0;
    }
    1. 16
    2. 15
    3. 10
    4. All of above
    5. None of these
Correct Option: A

16



Your comments will be displayed only after manual approval.