C program to read a string and print the length of the each word
In this program, we will learn how to count length of each word in a string in C language?
There are many string manipulation programs and string user defined functions, this is an another program in which we will learn to count the length of each word in given string.
In this exercise (C program) we will read a string, like "Hi there how are you?" and it will print the word length of each word like 2, 5, 3, 3, 4.
Hi there how are you?Output
2, 5, 3, 3, 4