Lesson 26: Reading files & capstone project
Last lesson we wrote to files — now we learn to read them back. fopen("data.txt", "r") opens for reading, fgets(line, sizeof line, f) reads line by line in a while loop and returns NULL at end of file, and fscanf parses lines into values: while (fscanf(f, "%19s %d", name, &grade) == 2). Then — the c