Question: Implement the Function any ( s 1 , s 2 ) Requirements: Write a function int any ( const char * s 1 , const

Implement the Function any(s1, s2)
Requirements:
Write a function int any(const char *s1, const char *s2) that searches the string s1 for the
first occurrence of any character present in the string s2.
The function should return the zero-based index of the first character in s1 that matches any
character in s2.
If no characters from s2 are found in s1, the function should return -1.

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 Programming Questions!