42_C_PISCINE/Test/c03/ex04/main.c

29 lines
448 B
C
Raw Permalink Normal View History

2023-05-17 12:45:25 -04:00
#include <stdio.h>
#include <string.h>
int main (void) {
char haystack1[20] = "TutorialsPoint";
char needle1[10] = "Point";
char *ret1;
ret1 = strstr(haystack1, needle1);
printf("The substring is: %s\n", ret1);
printf("\n");
char haystack2[20] = "TutorialsPoint";
char needle2[10] = "Point";
char *ret2;
ret2 = ft_strstr(haystack2, needle2);
printf("The substring is: %s\n", ret2);
return(0);
}