Mega Code Archive
Categories
/
C
/
String
Find substring
#include
#include
int main () { char str[] ="This is a line"; char *p; p = strstr (str, "is"); strncpy (p, "sample",5 ); puts (str); return 0; }