Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

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

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

Database Management An Organizational Perspective

Authors: Richard T. Watson

1st Edition

0471305340, 978-0471305347

More Books

Students also viewed these Databases questions

Question

=+6. What does the invisible hand of the marketplace do?

Answered: 1 week ago

Question

=+ 4. Why should policymakers think about incentives?

Answered: 1 week ago