Tag:True rule

  • Question mark statement

    Time:2021-4-28

    #include<iostream> using namespace std; int main(void) { int a = -1; a > 0 ? a = a : a = -a; cout << a; return 0; } The output is 1 Question mark statement means whether the statement before the question mark is true. If it is true, the statement before the colon will […]