summaryrefslogtreecommitdiff
path: root/reference/C/CONTRIB/OR_PRACTICAL_C/04_4.c
diff options
context:
space:
mode:
Diffstat (limited to 'reference/C/CONTRIB/OR_PRACTICAL_C/04_4.c')
-rw-r--r--reference/C/CONTRIB/OR_PRACTICAL_C/04_4.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/reference/C/CONTRIB/OR_PRACTICAL_C/04_4.c b/reference/C/CONTRIB/OR_PRACTICAL_C/04_4.c
new file mode 100644
index 0000000..2fa8ced
--- /dev/null
+++ b/reference/C/CONTRIB/OR_PRACTICAL_C/04_4.c
@@ -0,0 +1,13 @@
+#include <string.h>
+#include <stdio.h>
+
+char line[100];
+
+main()
+{
+ (void)printf("Enter a line: ");
+ (void)fgets(line, sizeof(line), stdin);
+
+ (void)printf("The length of the line is: %d\n", strlen(line));
+ return (0);
+}