diff options
author | Tomasz Kramkowski <tk@the-tk.com> | 2015-02-21 12:44:47 +0000 |
---|---|---|
committer | Tomasz Kramkowski <tk@the-tk.com> | 2015-02-21 12:44:47 +0000 |
commit | 5881b8c79e89742a7ea6f9d1716b7e63fbe5686a (patch) | |
tree | 1f7a2376b899dd47732d6539a1f93638b3e63695 | |
parent | 2e33bf65621b6ae22e88dae6e1053a6f59786172 (diff) | |
download | c-stuff-5881b8c79e89742a7ea6f9d1716b7e63fbe5686a.tar.gz c-stuff-5881b8c79e89742a7ea6f9d1716b7e63fbe5686a.tar.xz c-stuff-5881b8c79e89742a7ea6f9d1716b7e63fbe5686a.zip |
strcmp.c
-rw-r--r-- | strcmp.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/strcmp.c b/strcmp.c new file mode 100644 index 0000000..7633d80 --- /dev/null +++ b/strcmp.c @@ -0,0 +1,19 @@ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +int main(void) +{ + char *input; + + scanf("%ms", &input); + + if (strcmp(input, "Test") == 0) + printf("Match\n"); + else + printf("Fail\n"); + + free(input); + + return EXIT_SUCCESS; +} |