The int variable x contains the number 7.
Calculate the value of the following logical expressions:
a. x < 10 && x >= -1 b. !x && x >= 3 c. x++ == 8 || x == 7
a. true b. false c. false
#include <iostream> using namespace std; int main()// w w w .ja v a 2s . c o m { int x = 7; bool b = x < 10 && x >= -1; cout << b << endl; b = !x && x >= 3; cout << b << endl; b = x++ == 8 || x == 7; cout << b << endl; return 0; }