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