String in a String

Design and code a program that displays the number of times that a string appears within another string. 

Your program prompts for and accepts from the user a search string and a reference string.  Each string may include embedded whitespace.  Either string may be empty or may include leading or trailing whitespace. 

Your program reserves space for only the first thirty (30) characters of each string.  You may assume that the user will limit input to fit this memory restriction.  Do not ignore any trailing characters to an otherwise valid entry. 

Your program calls the occurences() function.  You may assume that that this function has been written and works as specified, even if you yourself have not written it. 

  Top  Go Back to the Top of this Page

  Designed by Chris Szalwinski   Copying From This Site