// Project operators.cpp // Illustrate some of the C++ // Operators. #include int main() { int x, y, z; x = 0x07; y = 0x0a; z = x + y; cout << x << " " << y << " " << z << endl; // Logical and operator // (short circuit operation). cout << (4 < x && x < y) << endl; // Bitwise operators. cout << hex << (x & y) << " " << (x | y) << " " << (x ^ y) << endl; // Tertiary conditional operator. cout << dec << ((x > y) ? x : y) << endl; return 0; } // Output: 7 10 17 1 2 f d 10