Created
December 17, 2014 04:00
-
-
Save yoichi/3e891274b6c1e23b9f00 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() | |
{ | |
if (int x = 0) { | |
printf("true: %d\n", x); | |
//printf("true: %d, ?: %d\n", x, y); // ‘y’ was not declared in this scope | |
} else if (int y = 0) { | |
printf("false: %d, true: %d\n", x, y); | |
} else { | |
printf("false: %d, false: %d\n", x, y); | |
} | |
} | |
// output: false: 0, false: 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment