diff options
Diffstat (limited to 'c,cc/scanf.c')
-rw-r--r-- | c,cc/scanf.c | 17 |
1 files changed, 17 insertions, 0 deletions
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 <stdio.h> + + +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; +} + |