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

Short-Circuit Skips the Side Effect

hardOperators

📄 Code

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

🎯 Your Answer