Question: Write code that takes two strings from the user, and finds the index of the second string inside the first. For example, happybirthhappyday and happy
Write code that takes two strings from the user, and finds the index of the second string inside the first. For example, happybirthhappyday and happy yields the result 10. If the substring is not in the string more than once, your code should return -1.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
