Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 2 (Strings) (10 marks) Write a C function which receives 2 strings L1 and Si, the function should count how many times the string

image text in transcribed

Question 2 (Strings) (10 marks) Write a C function which receives 2 strings L1 and Si, the function should count how many times the string S1 was found in Ll. (5 marks) Example: If user enters the following: L1: xyzabedhiabcefg" S1: "abe" The function should find abc repeated twice in L1, hence the function should return 2. In main do the following: (5 marks) 1. Define the 2 strings. 2. Read a complete line from user and place it in Ll. 3. Read a single word from user and place it in Si. 4. Pass the two strings to the function. 5. Print the count

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

More Books

Students also viewed these Databases questions

Question

Find the following. (e 2u + 4u) du

Answered: 1 week ago

Question

Explain Coulomb's law with an example

Answered: 1 week ago

Question

What is operating system?

Answered: 1 week ago

Question

What is Ohm's law and also tell about Snell's law?

Answered: 1 week ago