Question: I have been trying to solve these 2 C++ homework problems for my begininng C++ class. but I am having trouble. Can Someone help me

I have been trying to solve these 2 C++ homework problems for my begininng C++ class. but I am having trouble. Can Someone help me please? Thanks I have been trying to solve these 2 C++ homework problems for

4 THEFIRSTOFANY FUNCTION Write the function firstofAny (). The function has two parameters: const char * str and const char * chars. The first is the C-style string to search, and the second is a C-style string containing characters to search for. The function returns a pointer to the first occurrence of any character from chars appearing inside str. If none of the characters inside chars appear anywhere in the string, return a pointer to the trailing NUL character in str. You cannot use any library functions for this problem. You may use array or pointer notation. 5 THE LASTOFANY FUNCTION Write the function lastOfAny(). The function has two parameters: const char *str and const char * chars. The first is the C-style string to search, and the second is a C-style string containing characters to search for. The function returns the index (as a size t) of the last occurrence of any character from chars appearing inside str. If none of the characters inside chars appear anywhere in the string, return the value size t(-1). You cannot use any library functions for this problem. You may use array or pointer notation

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