Why is this code skipping the first character and printing a special character at the end of the file
问题 ch = getc(lname); while (ch != EOF) { ch = getc(lname); if (ch == '\n') temp++; //except the line to be deleted if (temp != delete_line) { //copy all lines in file replica.c putc(ch, rep); } } I have a file in which I have the following data Aryan Verma Vinayak Sharma Dev Deol Ameesh Deol the above code basically skips the line of data that I want to by putting the line value in delete_line. Here, temp is initiated to be 1. Now the problem is, this code is skipping the first char, i.e. "A" in