Answered step by step
Verified Expert Solution
Link Copied!

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 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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 19c DBA By Examples Installation And Administration

Authors: Ravinder Gupta

1st Edition

B09FC7TQJ6, 979-8469226970

Students also viewed these Databases questions