int main(void){
char datArray[5000][50];
char str[] = "test";
int x;
int found = 0;
FILE *fp;
int max = 5000;
fp = fopen("5000.txt", "r");
for(x = 0; x < max; x++){
fgets(datArray[x], 50, fp);
}
fclose(fp);
for(x = 0; x < max; x++){
if(strstr(datArray[x], str) != NULL){
found++;
printf("%s",datArray[x]);
}
}
printf("\n%i gefunden\n", found);
getchar();
return 0;
}