Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started