#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 }