Skip to content

Instantly share code, notes, and snippets.

@nyuichi
Last active August 29, 2015 14:05
Show Gist options
  • Save nyuichi/94fe6fb41f1e9eb60a2c to your computer and use it in GitHub Desktop.
Save nyuichi/94fe6fb41f1e9eb60a2c to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main()
{
char *s;
switch (getchar()) {
do {
case '0':
s = "zero";
break;
case '1':
s = "one";
break;
} while (0);
puts(s);
break;
default:
puts("x");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment