C File Management

Contents

  • File management in C
  • File operation functions in C
  • Defining and opening a file
  • Closing a file
  • The getw and putw functions
  • The fprintf & fscanf functions
  • Random access to files
  • fseek function.

File Operations

C supports a number of functions that have the ability to perform basic file operations, which include:
1. Naming a file 
2. Opening a file 
3. Reading from a file 
4. Writing data into a file 
5. Closing a file 
        


File Operations

Function 	NameOperation
fopen()	    Creates a new file for use, Opens a new	existing file for use
Fclose()	Closes file which has been opened for use
getc()	    Reads a character from a file
putc()	    Writes a character to a file
fprintf()	Writes a set of data values to a file
fscanf()	Reads a set of data values from a file
getw()	    Reads a integer from a file
putw()	    Writes an integer to the file
fseek()	    Sets the position to a desired point in the file
ftell()	    Gives the current position in the file
rewind()	Sets the position to the beginning of the file
        

Make Comments..!!


Oops!! No posts from user.

Download Android App