Skip to main content

bool variable in C++

 


#include<bits/stdc++.h>

using namespace std;

int main()
{
    bool n;
    n=true;  // It will return 1 (means true)
    cout<<n<<endl;
    n=false;    //It will return 0 (menat false)
    cout<<n;
    return 0;
}

Comments