Question: Write a program in C language that, each time a word is repeated (ie: the same word appears two or more times in a row,

Write a program in C language that, each time a word is repeated (ie: the same word appears two or more times in a row, with or without punctuation between OR repeated in the same line but not necessarily in a row), will output the word followed by the number of repetitions on a single line.

Treat all capitalized copies of the word as the same as uncapitalized ones. Assume that any punctuation type separates words EXCEPT FOR apostrophes, which are part of words.

Figure out how to represent the following text as a constant in your program.

TEXT:

"That's what people say, mm-mm

'Cause the players gonna play, play, play, play, play

And the haters gonna hate, hate, hate, hate, hate baby

I'm just gonna shake, shake, shake, shake, shake

Shake it off, shake it off"

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!