Created
October 3, 2016 16:06
-
-
Save erikroyall/64ea7432342a9b30ee88faa7ee25f960 to your computer and use it in GitHub Desktop.
`echo "potato" | ./not` after you compile
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
#include <stdio.h> | |
#include <stdlib.h> | |
int main(void) { | |
int inp; | |
fprintf(stdout, "not "); | |
while (1) { | |
inp = getchar(); | |
if (inp == EOF) break; | |
fprintf(stdout, "%c", inp); | |
} | |
return EXIT_SUCCESS; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment