Last active
April 25, 2018 04:15
-
-
Save annibuliful/2eacec4c750c61d5e9f6edb51788b445 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <string.h> | |
| int main(){ | |
| int i; | |
| const char allData[3][100] = {"TutorialsPoint" , "Tuopoint" , "aws"}; | |
| char pattern[10]; | |
| char *ret; | |
| scanf("%s" , pattern); | |
| printf("[Result]\n\n"); | |
| for(i = 0 ; i < 3 ; i++ ){ | |
| ret = strstr(allData[i] , pattern); | |
| if(ret != NULL){ | |
| printf("%s\n" ,allData[i]); | |
| } | |
| } | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment