C: File Processing
fopen() to open a file
fopen("filename", "mode")
modes:
'r' to read
'w' to write
'a' to append data
'r+' to read/write
'w+' to read/write
'a+' to read/append
'rb' to read (binary)
'wb' to write (binary)
fclose() to close a file
fcloseall() to close all files
fgetc() to read one character from a file
fputc() to write one character to a file
fgets() to read a line from a file
fputs() to write a line to a file
fscanf() to read from a file with scanf()
fprintf() to write to a file with printf()
fopen("filename", "mode")
modes:
'r' to read
'w' to write
'a' to append data
'r+' to read/write
'w+' to read/write
'a+' to read/append
'rb' to read (binary)
'wb' to write (binary)
fclose() to close a file
fcloseall() to close all files
fgetc() to read one character from a file
fputc() to write one character to a file
fgets() to read a line from a file
fputs() to write a line to a file
fscanf() to read from a file with scanf()
fprintf() to write to a file with printf()
2201757635
skyconnectiva.com
binus.ac.id
Juanda P. G.
skyconnectiva.com
binus.ac.id
Juanda P. G.
Comments
Post a Comment