You're developing a text editor and need to implement a search feature. Which function could be useful to check if a certain word exists in a text?

  • strcat
  • strlen
  • strrev
  • strstr
In this scenario, the strstr function is appropriate for searching for a specific word within a text. It returns a pointer to the first occurrence of the specified word in the text, allowing you to check if it exists. strrev reverses a string, strlen provides the length of a string, and strcat concatenates strings.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *