Mode "a" adds at the end instead of wiping the file. Old text stays.
Append mode adds at the end. Old text stays. Hello was already in the file; after this run the file has Hello and then C. The terminal still prints OK.
old
append
new
file
Each step highlights the matching C line. Program output appears only when a line that prints actually runs.
Five questions. Pick one answer each, then Check answers. The correct choice turns green.
1. Starting file Hello, after append C the file has:
Old + new.
2. Stdout is:
printf OK.
3. If you had used "w" instead:
Overwrite.
4. Append mode is:
a.
5. Another kind: logging without fclose every line might:
Buffering.