The fopen
function collects information related to the file and generates the FILE structure type
variable and returns the address value of the variable.
The FILE structure type
variable cannot be created because it cannot collect information related to the file when opening the file fails, thus returning the NULL
value.
file *fp;
in the question is a typo in FILE *fp;
. fp
containing information related to an open file is called by various names such as file stream
, open file
, and FILE structural variable address value
to read, write, or close other functions related to the file.
© 2024 OneMinuteCode. All rights reserved.