What exactly is the FILE structure that we use for fopen? How does it work exactly?

1 Answer 1


According to cplusplus.com:

Object containing information to control a stream

[FILE is an] object type that identifies a stream and contains the information needed to control it, including a pointer to its buffer, its position indicator and all its state indicators.

FILE objects are usually created by a call to either fopen or tmpfile, which both return a pointer to one of these objects.

The content of a FILE object is not meant to be accessed from outside the functions of the <cstdio> and <cwchar> headers;

If you want to learn more about it, you can go to cplusplus.com or cppreference.com.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .