/* * File: linelen.c * --------------- * This file contains a main program that reports the * length of an input line. */ #include #include /* Main program */ main() { char str[80]; printf("This program tests the strlen() function.\n"); printf("Enter a string: "); scanf("%[^\n]", str); printf("The length is %d.\n", strlen(str)); }