C/FILE Structure !
Expert: Prince M. Premnath - 5/19/2008
QuestionWhat FILE Keyword represent in c language?
AnswerHai Dear Ganesh !
First of all let me confirm you that FILE is not a key word , perhaps its a user defined data type defined in stdio.h , presenting you the following code to justify my answer !
typedef struct {
int level; /* fill/empty level of buffer */
unsigned flags; /* File status flags */
char fd; /* File descriptor */
unsigned char hold; /* Ungetc char if no buffer */
int bsize; /* Buffer size */
unsigned char *buffer; /* Data transfer buffer */
unsigned char *curp; /* Current active pointer */
unsigned istemp; /* Temporary file indicator */
short token; /* Used for validity checking */
} FILE;
( Note : Code Excerpt copied from stdio.h )
While dealing with files in C programming , sure you might have came across this codes.
FILE * fp;
fp is a file pointer of type FILE , this file pointer is just to store the composite information about a file subject to manipulation , since you are a beginner definition regarding the FILE structure members are out of scope , if you wish to have please post me a follow up !
Thanks and Regards !
Prince M. Premnath