C++ examples for Operator:Logical Operator
&& operator determines if two different relational operators are both true.
#include <iostream> using namespace std; int main(int argc, char* argv[]) { bool isTrue { (10 == 10) && (12 == 12) }; cout << "True? " << isTrue << endl; bool isFalse = isTrue && (1 == 2); cout << "True? " << isFalse << endl; return 0;/*from w w w. j av a 2 s. c o m*/ }