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.
Loading...
Related Quiz
- What is the significance of using pointers when working with structures in C?
- You are working on a software project in C++ that requires sorting a list of items in multiple ways. How could you leverage function overloading to achieve this?
- You are working on an application that requires fast data retrieval times. What method of file access would be most suitable?
- What is the significance of the size_t return type in the fwrite function?
- You are debugging a C program and notice that the program crashes after running for a few minutes. Upon investigation, you find that a recursive function is being called multiple times. What could be the most likely cause of the crash?