CS_8251 - Unit 5 - Quick Sheet
Supplementary cards to CS_8251 Unit 5
29 flashcards · Programming Languages · by kgashok
putw()
writes a integer to a file
fwrite()
writes specific number of bytes to binary files
fread()
reads specific number of bytes from binary file
rewind()
set the position to the beginning point
ftell()
gives current position in the file
fseek()
set the position to desire point
getw()
reads a integer from a file
fprintf()
writes a set of data to a text file
fscanf()
reads a set of data from a text file
putc()
writes a character to a file
getc()
reads a character from a file
fgets()
get a string from file
fclose()
closes a file
fopen()
create a new file or open a existing file
fopen() - prototype?
FILE *fp = fopen( char *filename, char *mode);
fclose() - prototype?
int fclose ( FILE *fp);
fgets()
char *fgets( char *str, int count, FILE *stream );
getc()
int getc( FILE *stream );
putc()
int putc( int ch, FILE *stream );
fscanf() - prototype?
int fscanf( FILE *stream, const char *format, ... );
fprintf() - prototype?
int fprintf( FILE *fp, const char *format, ...);
getw() - prototype?
int getw( FILE *fp);
putw() - prototype?
int putw( int w, FILE *stream);
fseek() - prototype?
int fseek ( FILE *stream, long offset, int whence);
ftell() - prototype?
long ftell( FILE *stream );
rewind() - prototype?
void rewind( FILE *stream );
fread() - prototype?
size_t fread( void *buffer, size_t size, size_t count);
fwrite() - prototype?
size_t fwrite( const void *buffer, size_t size, size_t count);
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.