In C, which function can be used to search for a substring within a string?
- find()
- locate()
- search()
- strstr()
The strstr() function in C is used to search for a substring within a string. It returns a pointer to the first occurrence of the substring or NULL if the substring is not found.
Loading...
Related Quiz
- In a program that processes large volumes of numerical data, which file format would be more efficient in terms of storage space and data retrieval speed?
- How does the 'register' keyword affect the storage of a variable in a C program?
- In a program that processes large amounts of data, what strategy can be used to optimize the performance of loops?
- In C, a function pointer can be used to call a function without knowing its ________ at compile time.
- What is the advantage of using function pointers in C for implementing callback functions?