#include<stdio.h> #include<stdlib.h> int main() { int i = 3; if (i==4) { i++; printf("%d\n",i); } return EXIT_SUCCESS; }Plain source version to compile.
This version has no output, since the printf statement is enclosed in the compound statement of the failing if.¥
#include<stdio.h> #include<stdlib.h> int main() { int i = 3; if (i==4) i++; printf("%d\n",i); return EXIT_SUCCESS; }Plain source version to compile.
This version prints out the number 3, since the if only applies to the i++ statement.