ternary operator c assignment code example Example: how to use ternary operator in c programming int a = 10, b = 20, c; c = (a < b) ? a : b; printf("%d", c);