+ 1

What does it mean?

a < b ? a : b

19th Aug 2018, 7:55 PM
DarkEye
DarkEye - avatar
2 Answers
+ 4
DarkEye it is ternary operations... below is syntax for the same : (condition) ? (code to be executed if condition is true ) : (code to be executed if condition is false) let me give you example: int a = 10; int b = 20; int c = a<b ? a : b ; with this, c becomes 10... if a is 5 and b is 3, c becomes 3
19th Aug 2018, 8:09 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
+ 1
okay thank you :)
19th Aug 2018, 8:35 PM
DarkEye
DarkEye - avatar