in c 2b 2b 2b 2b how to write if without if

Solutions on MaxInterview for in c 2b 2b 2b 2b how to write if without if by the best coders in the world

showing results for - "in c 2b 2b 2b 2b how to write if without if"
Lena
11 Jan 2019
1(expression 1) ? expression 2 : expression 3 ---->If expression 1 is
2evaluates to true, then the expression 2 is evaluated else then the expression 3
3is evaluated.
4Example :
5  int s = (20 >= 2) ? 30 : 40;
6   cout << s ;  //prints 30