/***************************************************************** * * Purpose: Program to demonstrate the 'strstr' function. * Author: M J Leslie * Date: 18-Jun-94 * *****************************************************************/ #include #include main() { char string[]="string to search"; char test[]="sear"; /* strstr returns a pointer into 'string' * if 'test' is found' if not found, NULL * is returned. */ if (strstr(string, test)) puts("String found"); }