Is a FILE
object created and returned by fopen()
a dynamic or static variable or something else?
In the following example,
#include <stdio.h>
FILE *open_data(void) {
FILE *fp;
if ((fp = fopen("datafile", "r")) == NULL)
return (NULL);
return (fp);
}
Is the FILE
object created and returned by open_data()
an automatic variable? If not, what is its storage duration and linkage?
when a call to open_data()
returns, will the FILE
object created and returned by open_data()
be destroyed?