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 "This is a sentence" and str en then the function will return If is the same and s then the function will return
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.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
