Writing to files can be done in various ways:
- putc() - like fputc()
- fputc() - int fputc (int character, FILE * stream); - write a character to a file
- fputs() - int fputs (const char * string , FILE * stream); - write a string to a file
- fprintf()- int fprintf (FILE * stream , const char * format [ , argument , ...] ); - works like printf() except that it writes to a file instead of
- STDOUT.
just like reading from files:
- getc() - like fgetc()
- fgetc() - int fgetc (FILE * stream); - write a character to a file
- fgets() - char * fgets (char * string , int num , FILE * stream); - write a string to a file
- fscanf() - int fscanf ( FILE * stream , const char * format [ , argument , ...] ); - works like scanf() except that it reads from a file instead of STDIN
0 comments:
Post a Comment