Question : write to file in c programming
Answered by : stupid-shrike-iejojj9s7thy
[...] printf("Enter name: \n"); if (fgets(name, sizeof name, stdin)) { fputs(name,fileptr); fclose(fileptr); printf("File write was successful\n"); } else { printf("Read error.\n"); }
Source : https://stackoverflow.com/questions/8115218/writing-user-input-to-a-file-in-c | Last Update : Sun, 16 May 21