How do you make a C program save a file that it can access later even after restarting the program?
How do you make a C program save a file that it can access later even after restarting the program?
Save
fopen + fprintf
Load
fopen + fscanf
or
Save
fopen + fwrite
Load
fopen + fread
Go look them up in your manual pages (or on the interwebs)
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Thanks