7
answers
1
watching
335
views

please use c language and use function method to solve it

Check Substring You are given two strings s1 and s2. Write a function isSubstring(char s1[], char s2[]) which takes two strings as input, and returns the start index if the second string is a substring of the first, else returns -1. (Case Insensitive) Note: Print the result in the main() function.

4.1 Example

4.1.1

Input: Starfish

Star

Output:

0

4.1.2

Input:

Starfish

Fish

Output: 4

4.1.3

Input: Exhibition habit

Output: -1

For unlimited access to Homework Help, a Homework+ subscription is required.

Avatar image
Liked by cecilia

Unlock all answers

Get 1 free homework help answer.
Already have an account? Log in
Already have an account? Log in
Already have an account? Log in
Already have an account? Log in
Already have an account? Log in
Already have an account? Log in
Avatar image
Read by 1 person
Already have an account? Log in

Weekly leaderboard

Start filling in the gaps now
Log in