summaryrefslogtreecommitdiff
path: root/reference/C/CONTRIB/OR_PRACTICAL_C/04_4.c
blob: 2fa8ced37c944300794cb1b181c139fbb7f8efde (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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);
}