#include <stdio.h> #include <string.h> int main(void) { const char *hay = "the quick brown fox"; const char *at = strstr(hay, "brown"); if (at != nullptr) { printf("%s\n", at); } return 0; }
find a substring, or NULL