From 258e1b92ebbfdebefabc120969ab87c3d8b75c3d Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Sun, 15 Jun 2014 03:50:12 +0200 Subject: old c,cc examples --- c,cc/scanf.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 c,cc/scanf.c (limited to 'c,cc/scanf.c') diff --git a/c,cc/scanf.c b/c,cc/scanf.c new file mode 100644 index 0000000..21dda28 --- /dev/null +++ b/c,cc/scanf.c @@ -0,0 +1,17 @@ +#include + + +int main (void) +{ + char str[80]; + int res; + + res = scanf(" %s", str); + printf("%d %s\n", res , str); + res = scanf("%s ", str); + printf("%d %s", res, str); + res = scanf(" %s", str); + printf("%d %s\n", res, str); + return 0; +} + -- cgit v1.2.3