CJCoding With Joseph
← Back to Question List
C Code Walkthrough #13

Ternary Picks the Smaller Value

easyOperators

📄 Code

Read carefully — what does this print?
1#include <stdio.h>
2int main() {
3 int a = 8, b = 5;
4 int min = (a < b) ? a : b;
5 printf("%d\n", min);
6 return 0;
7}

🎯 Your Answer