C++ ternary conditional Posted on 2020-02-07 | In C++ | Words count in article 122 In C++, ternary conditional/operator ?: can be understood by the following: 123int a = 2, b = 1; int c = a > b ? a-- : b--; cout << a << ", " << b << ", " << c << endl; // 1, 1, 2 123int a = 2, b = 1; int c = a <= b ? a-- : b--; cout << a << ", " << b << ", " << c << endl; // 2, 0, 1