program lines - read lines from a text file using fgets

This commit is contained in:
2026-07-02 09:34:19 +10:00
parent 8020d45db7
commit b826126635
3 changed files with 49 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
Reading and Writing Files in C
copy - copy one file to a new file, one letter at a time.
lines - read lines from a text file using fgets.
todo: lines_2 - remove the \n from the end of each line.
https://stackoverflow.com/questions/2693776/removing-trailing-newline-character-from-fgets-input
https://man.freebsd.org/cgi/man.cgi?query=strcspn&sektion=3