CS_8251 - Unit 5 - Quick Sheet

Supplementary cards to CS_8251 Unit 5

29 flashcards · Programming Languages · by kgashok

  1. putw()

    writes a integer to a file

  2. fwrite()

    writes specific number of bytes to binary files

  3. fread()

    reads specific number of bytes from binary file

  4. rewind()

    set the position to the beginning point

  5. ftell()

    gives current position in the file

  6. fseek()

    set the position to desire point

  7. getw()

    reads a integer from a file

  8. fprintf()

    writes a set of data to a text file

  9. fscanf()

    reads a set of data from a text file

  10. putc()

    writes a character to a file

  11. getc()

    reads a character from a file

  12. fgets()

    get a string from file

  13. fclose()

    closes a file

  14. fopen()

    create a new file or open a existing file

  15. fopen() - prototype?

    FILE *fp = fopen( char *filename, char *mode);

  16. fclose() - prototype?

    int fclose ( FILE *fp);

  17. fgets()

    char *fgets( char *str, int count, FILE *stream );

  18. getc()

    int getc( FILE *stream );

  19. putc()

    int putc( int ch, FILE *stream );

  20. fscanf() - prototype?

    int fscanf( FILE *stream, const char *format, ... );

  21. fprintf() - prototype?

    int fprintf( FILE *fp, const char *format, ...);

  22. getw() - prototype?

    int getw( FILE *fp);

  23. putw() - prototype?

    int putw( int w, FILE *stream);

  24. fseek() - prototype?

    int fseek ( FILE *stream, long offset, int whence);

  25. ftell() - prototype?

    long ftell( FILE *stream );

  26. rewind() - prototype?

    void rewind( FILE *stream );

  27. fread() - prototype?

    size_t fread( void *buffer, size_t size, size_t count);

  28. fwrite() - prototype?

    size_t fwrite( const void *buffer, size_t size, size_t count);

  29. Function Description fopen() create a new file or open a existing file fclose() closes a file fflush() writes out buffer contents to file SEQUENTIAL OPERATIONS getc() reads a character from a file getw() reads a integer from a file fscanf() reads a set of data from a file putc() writes a character to a file putw() writes a integer to a file fprintf() writes a set of data to a file fgets() gets a string from a file of specified length BINARY OPERATIONS fseek() set the position to desired point f…

    All important functions related to file processing.