hello guys,
who would like to help create a function that calculates the number of a specific word (entered by the user) in a text. the program should continue reading the text until it finds a dot (.)
the prototype should be : int countWordInText(char* text, int size, char* wordToCount);
ps : scanf( )” is not appropriate since the text may contain spaces and new lines. e.g. a paragraph.
The text will have as a sentinel a dot ‘.’
Have 200 as a MAX_SIZE for the text,
thank you