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

  • findchar
  • locatechar
  • strchr
  • searchchar
The correct answer is strchr. strchr is a standard C function used to find the first occurrence of a character in a string. The other options are not valid C functions for this purpose.
Add your answer
Loading...

Leave a comment

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