The ________ function in C is used to search for the first occurrence of a character in a string.

  • strchr()
  • strnchr()
  • strsearch()
  • strstr()
In C, the strchr() function is used to search for the first occurrence of a character in a string. It returns a pointer to the first occurrence or a null pointer if the character is not found. This function is commonly used in C for string manipulation.
Add your answer
Loading...

Leave a comment

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