aboutsummaryrefslogtreecommitdiffstats
path: root/scanf.c
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2015-02-21 12:37:48 +0000
committerTomasz Kramkowski <tk@the-tk.com>2015-02-21 12:37:48 +0000
commit2e33bf65621b6ae22e88dae6e1053a6f59786172 (patch)
tree7561af54f94c7c0b74e227eccec38767fad7ebef /scanf.c
parent35e4f1939645be6673cad3b49290c91946cad599 (diff)
downloadc-stuff-2e33bf65621b6ae22e88dae6e1053a6f59786172.tar.gz
c-stuff-2e33bf65621b6ae22e88dae6e1053a6f59786172.tar.xz
c-stuff-2e33bf65621b6ae22e88dae6e1053a6f59786172.zip
scanf.c
Diffstat (limited to 'scanf.c')
-rw-r--r--scanf.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/scanf.c b/scanf.c
new file mode 100644
index 0000000..67fdc9b
--- /dev/null
+++ b/scanf.c
@@ -0,0 +1,13 @@
+#include <stdio.h>
+#include <stdlib.h>
+
+int main(void)
+{
+ char *input;
+ scanf("%ms", &input);
+
+ printf("%s", input);
+ free(input);
+
+ return EXIT_SUCCESS;
+}