• FILE

  • fopen

1
FILE* fopen (char* name, char* mode);

used to openning file with file name name.

  • mode

    • “r” : read
    • “w” : write (will be overwrited), (make new file if it doesn’t exist and possible)
    • “a” : append (make new file if it doesn’t exist and possible)
    • “rb” : binary-read
    • “wb” : binary-write (will be overwrited), (make new file if it doesn’t exist and possible)
    • “ab” : binary-append (make new file if it doesn’t exist and possible)
  • getc

1
int getc (FILE* fp);
  • putc
1
int putc (int c, FILE* fp);
  • getchar
1
#define  getchar()  getc( stdin )
  • putchar
1
#define  putchar(c)  putc( (c), stdout )
  • fscanf
1
int fscanf (FILE* fp, char* format, ...);
  • fprintf
1
int fprintf (FILE* fp, char* format, ...);
  • fclose
1
int fclose (FILE* fp)