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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started