Question: Please answer in C only! Define a word as a sequence of consecutive English letters. Given a string, count number of words in it and

 Please answer in C only! Define a word as a sequence

Please answer in C only!

Define a word as a sequence of consecutive English letters. Given a string, count number of words in it and find the longest word. The words are separated by following characters: space (') or new line (' ') or tab ("\t') or a combination of these. The program will take the input string from the stdin and output the number of words and length of the longest word. Example: Output 25 Input Hello World This is a long sentence. Welcome to cs240 This is a test input 4 4 ("sentence." is not a word) 27 ("CS240" is not a word) 5 5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!