FILE structure in C Programming

February 3, 2012 No Comments » Hits : 329





FILE structure in C Programming

  1. C Provides smart way to manipulate data using streams
  2. In stdio.h header file FILE structure is defined
  3. FILE structure provides us the necessary information about a FILE or stream which performs input and output operations

Structure :

typedef struct
{
 short level ;
 short token ;
 short bsize ;
 char fd ;
 unsigned flags ;
 unsigned char hold ;
 unsigned char *buffer ;
 unsigned char * curp ;
 unsigned istemp;
}FILE ;

Members of Structure :

[table style="2"]

MemberUse / Function
levelFill / Empty level of Buffer
tokenValidity Checking
bsizeBuffer size
fdFile descriptor using which file can be identified
flagsFile status flag
holdungetc character if no buffer space available
bufferData transfer buffer
curpCurrent active pointer
istempTemp. File indicator

[/table]

Incoming search terms: