Answers for "in c++ ++ how to write if without if"

C++
1

in c++ ++ how to write if without if

(expression 1) ? expression 2 : expression 3 ---->If expression 1 is
evaluates to true, then the expression 2 is evaluated else then the expression 3
is evaluated.
Example :
  int s = (20 >= 2) ? 30 : 40;
   cout << s ;  //prints 30
Posted by: Guest on July-09-2021

Browse Popular Code Answers by Language