CJCoding With Joseph
15free / daySign inCreate account
Back to Code Walkthrough

Short-Circuit Skips the Side Effect

C code walkthrough · Question 32
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