1 2 3 4 5 6 7 8 9 10 11
#include <string.h> int main(void){ char *s1 = "hello"; char *s2 = "hello world"; char *s3 = "goodnight vienna"; char *res; res = strstr(s1, s2); sprintf("result %s\n", res); res = strstr(s1, s3); sprintf("result %s\n", res); }
1
Segmentation fault