Mega Code Archive
Categories
/
C
/
Code Snippets
Find substring how to use strstr
#include
#include
int main () { char str[] ="Hello World"; char *j; j = strstr (str, "is"); strncpy (j, "sample",5 ); puts (str); return 0; }