init
This commit is contained in:
28
Test/c03/ex04/main.c
Normal file
28
Test/c03/ex04/main.c
Normal file
@ -0,0 +1,28 @@
|
||||
#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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user