I need to know whats wrong with this code.
#include<stdio.h>
#include<string.h>
int main() {
char a[50], b[100], c[5000];
char *ret;
//enter first name
gets(a);
//enter secend name
gets(b);
//enter statement
gets(c);
strcat(a,b);
if(strstr(c,a) != NULL) {
printf("found your full name");
} else {
printf("not found your full name");
}
return 0;
}
It does not work when, I use the following lines:
mohamed
ramadan
abdelrhmanamirelbatanonywoofymohamedramadanahmedalyomarelazazyahmedkamelahmedsalemessamelnaggarkhaledhelmy
It should find something, but the programm tells me, that it hasn't.