Examveda

What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
    int a = 0;
    int b = 10;
    if ( a && b )
    {
        cout << "true"<< endl ;
    }
    else
    {
         cout << "false"<< endl ;
    }
    return 0;
}

A. true

B. false

C. error

D. 10

Answer: Option B


Join The Discussion

Related Questions on Classes and Objects in C plus plus