<condition> ? <true-case-code> : <false-case-code>;
x = condition ? expression1 : expression2
// Example:
double x = 1 > 0 ? 10 : 20; // put any value
(n1 > n2) ? n1 : n2;
OR
n1 > n2 ? n1 : n2;
#include <iostream>
int main()
{
int value = (1 > 0 ? 12 : 41);
/*
if 1 > 0 then value is 12, else 41
*/
int val2 = (1 > 0 ? (2 > 4 ? 42 : 45) : 41); // nested
}