aboutsummaryrefslogtreecommitdiffstats
path: root/strcmp.c
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2015-02-21 12:44:47 +0000
committerTomasz Kramkowski <tk@the-tk.com>2015-02-21 12:44:47 +0000
commit5881b8c79e89742a7ea6f9d1716b7e63fbe5686a (patch)
tree1f7a2376b899dd47732d6539a1f93638b3e63695 /strcmp.c
parent2e33bf65621b6ae22e88dae6e1053a6f59786172 (diff)
downloadc-stuff-5881b8c79e89742a7ea6f9d1716b7e63fbe5686a.tar.gz
c-stuff-5881b8c79e89742a7ea6f9d1716b7e63fbe5686a.tar.xz
c-stuff-5881b8c79e89742a7ea6f9d1716b7e63fbe5686a.zip
strcmp.c
Diffstat (limited to 'strcmp.c')
-rw-r--r--strcmp.c19
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;
+}