Question: I am currently writing a code in C to count lines and is having issues, below shows the requirement output with the input entered. if

I am currently writing a code in C to count lines and is having issues, below shows the requirement output with the input entered. if there are multiply spaces between the strings then they are counted as one space as shown in the third input line

11111 22222 33333 //Input linecount=1 //Output spacecount=2 //Output yyyyyyyyyyyyyyyyy //Input linecount=2 //Output spacecount=2 //Output y y y y y y //Input linecount=3 //Output spacecount=7 //Output 112 112 112 112 //Input linecount=4 //Output spacecount=10//Output 3333333333333333333333333 33333333 //Input linecount=5 //Output spacecount=11 //Output 333333 333333 3333333 //Input linecount=6 //Output spacecount=13 //Output abcdefg //Input linecount=7 //Output spacecount=13 //Output yyyyyyyyyy yyyyyyyyyy yyyyyyyyy //Input linecount=8 //Output spacecount=15 //Output linecount=9 //Output spacecount=15 //Output FINAL linecount=9 spacecount=15 //Final Output

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!