7
answers
1
watching
335
views
17 May 2021
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
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
Liked by cecilia
19 May 2021
Read by 1 person
lazylooserLv1
6 Jun 2021
Already have an account? Log in