#include using namespace std; int main() { { int x = 2; int y = x++; //y is still 2 x is 3 cout << x << y << endl ; } { int x = 2 ; int y = ++x ; //x is 3 y is also 3 cout << x << y << endl ; } { int x = 2 ; int y = 4 ; cout << x++ << --y << endl ; //prints out //x is 2 y is 3 } { int x = 2 ; int y = 2 * x++ ; cout << x << y << endl ; //prints x is 3 y is 4 } { int x = 99; //x is 99 in the expression if (x++ < 100) //now x is 100 cout << "It is true!\n" << endl ; else cout << "It is false!\n" << endl ; } { int x = 0 ; //x is 1 in the expression if (++x) cout << "It is true!\n" << endl ; else cout << "It is false!\n" << endl ; } }