Write C Void Function Names Locateword Finds Displays Locations Occurrence Word Within Lin Q37291704

Write a C++ void Function names LocateWord that finds anddisplays the locations of all occurrence of a word within a line oftext. The line of text and the word to locate for are string typevalues to be passed into the function as parameters. Show the codefor function definition only.

Example of text is: ” The icon for apple is not a completeapple, but an apple with a bite taken”. The output of the programshould be ” the word apple appears at location : 13, 15, 18,20.

Note: The output of the program is just anexample. The output isn’t correct. Would you please

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.