Question: Write a c++ program that receives a string and a character and return the index of the character if it is present in the string
Write a c++ program that receives a string and a character and return the index of the character if it is present in the string or -1 otherwise. The function is similar to linear search function but works with characters.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
