Question: Problem: Write two functions: one called subString char * * , char * ) which has two pointers ( to pass strings ) as arguments

Problem: Write two functions: one called subString char **, char *) which has two pointers (to pass strings) as arguments and return an integer. The other function is called , int **, int **) and no return value.
The subString function will compare the first string with the second and count how many times the second string is a substring of the first one. For example, if str1= "This is a sentence" and str 2="en", then the function will return 2. If str1 is the same and str2="s", then the function will return 3.
The function stat will count how many letters (not including spaces) and how many words in the first argument and will return the values in other two variables. For simplicity, you can assume the input string has either letters or spaces, has no space at the beginning and the end and there is only one space between two words. In the main function, repeatedly prompt user to input two strings from keyboard, call the two functions and output the results. You cannot use any string functions.
 Problem: Write two functions: one called subString char **, char *)

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!