1//(expression 1) ? expression 2 : expression 3
2//If expression 1 evaluates to true, then expression 2 is evaluated.
3 int x, y = 10;
4
5 x = (y < 10) ? 30 : 40;
6 cout << "value of x: " << x << endl; //prints 40
7
8
1 // syntax
2condition ? inline code for ture condition : inline code for false condition;
3
43 > 2 ? true : false; // return true