Home » C++ Programming » Operators » Question
  1. What is the output of this program?
    #include <iostream>
    using namespace std;
    int main()
    {
    int Number1 = 7;
    int Number2 = 5;
    if ( Number1 && Number2 )
    {
    cout << "True"<< endl ;
    }
    else
    {
    cout << "False"<< endl ;
    }
    return 0;
    }
    1. Compilation Error
    2. False
    3. Runtime Error
    4. True
    5. None of these
Correct Option: D

&& is called as Logical AND operator, if there is no zero in the operand means, it will be true otherwise True.



Your comments will be displayed only after manual approval.