Mega Code Archive
Categories
/
C
/
Language Basics
Use ternary operator in printf
#include
int main(void) { int x = 5, y = 10; printf("Max of %d and %d is: %d\n", x, y, (x>y ? x : y)); return 0; }