#include <stdio.h>
#include <string.h>
int main() {
FILE* fp = fopen("d:\\data.txt", "r");
char line[80];
if (!fp) {
puts("File doesn't exist");
return 1;
}
// char *strstr (const char *str1, const char *str2);
// returns a pointer to the first characters of str2 in str1 or null pointer if not found
while (fgets(line, sizeof(line), fp)) {
if (!strstr(line, "Java")) { // ! include
printf("%s", line);
}
}
fclose(fp);
return 0;
}
/*
run:
C C++ Python
C#
C++ is a high-level
Is Rust harder than Python
Visual Studio C/C++ IDE
Learn C
C Programming
*/