Question: Exercise: Please make a file called find_one_char.cpp that contains a function that fits the following spec: (C++ please) Name: find_one_char 2 Arguments: an array of
Exercise: Please make a file called find_one_char.cpp that contains a function that fits the following spec: (C++ please)
Name: find_one_char
2 Arguments: an array of characters arr, and a character c. (The type of arr is char[].)
Return: the first index where the char c can be found in arr, if at all (stop looking when you reach the null byte). Return the index of the null byte if c is not found in that range.
Example: if the character sequence is "hello", and we call find_one_char("hello", 'e'); then we return 1.
Example: if the character sequence is "hello", and we call find_one_char("hello", 'z'); then we return 5.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
