Try this exercise. Click the correct answer from the options.
What is the purpose of the find() function in C++?
Click the option that best answers the question.
- To search for the first occurrence of a substring within a string
- To search for the last occurrence of a substring within a string
- To check if a string contains a substring
- To replace all occurrences of a substring within a string


