search in a file for a specific line c code
问题 I am working on C. I would like to ask what s the best way to search in a file for a specific line (or multiple lines)? Can someone please give me an example. I have 2 files and I would like to see if this two files are 80% identical. I thought about searching in one of the file some specific lines from the other file. Thx I need some example in C code. here is a small example int compareFile(FILE* file_compared, FILE* file_checked) { bool diff = 0; int N = 65536; char* b1 = (char*) calloc (1