Question: Complete this program in C. Read the comments in this program to get an idea of what this program needs to achieve. Examples of input

Complete this program in C. Read the comments in this program to get an idea of what this program needs to achieve.

Examples of input and output:

Complete this program in C. Read the comments in this program to

get an idea of what this program needs to achieve. Examples of

input and output: Please enter a string, finishing the entry by pressing

Enter. apple Please enter another string, finishing the entry by pressing Enter.

applestrudle The strings you entered are "apple" and "applestrudle". "apple" is contained

as a substring in "applestrudle". Please enter a string, finishing the entry

by pressing Enter. adam Please enter another string, finishing the entry by

Please enter a string, finishing the entry by pressing Enter. apple Please enter another string, finishing the entry by pressing Enter. applestrudle The strings you entered are "apple" and "applestrudle". "apple" is contained as a substring in "applestrudle". Please enter a string, finishing the entry by pressing Enter. adam Please enter another string, finishing the entry by pressing Enter. Madame Bovary The strings you entered are "adam" and "Madame Bovary". "adam" is contained as a substring in "Madame Bovary". Please enter a string, finishing the entry by pressing Enter. Please enter another string, finishing the entry by pressing Enter. banana The strings you entered are " and "banana". "" is contained as a substring in "banana". Please enter a string, finishing the entry by pressing Enter. oranje Please enter another string, finishing the entry by pressing Enter. Goranje The strings you entered are "oranje" and "Goranje". "oranje" is contained as a substring in "Goranje". #include int main(int arge, char **argv) { const int BUF LEN = 128; char haystack (BUF LEN); char needle[BUF LEN); char c; int i, j, substring, found; int needle_len, haystack_len; /* Get the user to enter two strings */ printf("Please enter a string, finishing the entry by pressing Enter. "); for (i=0; i

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!