Created
December 8, 2015 15:32
-
-
Save KristianLyng/d144b3cbd2a1963e17d8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| kly@leia:~$ cat foo.c | |
| #include <stdio.h> | |
| int main(char *b, char **a) | |
| { | |
| b = ((int) b > 1 ? a[1] : "meh" ) -1; | |
| while (*++b || !putchar('\n')) { | |
| putchar(*b > 96 && *b < 123 ? *b - 32 : *b); | |
| }; | |
| } | |
| kly@leia:~$ gcc -Wno-pointer-to-int-cast foo.c | |
| kly@leia:~$ ./a.out "Hei du din løk" | |
| HEI DU DIN LøK | |
| kly@leia:~$ ./a.out "" | |
| kly@leia:~$ ./a.out | |
| MEH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment