What is FILE pointer in c programming language?

FILE pointer is struct data type which has been defined in standard library stdio.h. This data type points to a stream or a null value. It has been defined in stdio.h as

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


techfied said...

yes, but what is the difference between file and ordinary pointer and suppose if i want to use file pointer like a memory pointer is that possible ?

Bhavini Sarkar said...

A file pointer is a bridge between c program and file/stream. We can declare a FILE pointer as follows:

FILE *file;

FILE pointer in C is an interface for our programs to interact with files.

zeeshan khan said...

Good job


What is the default file pointers of a program

PiyushRaj Jha said...

What Is the purpose of file pointer