0

I am currently reading through copy.c to try to understand how it works. However, I am confused what data type is this line of code declaring.

FILE *inptr = fopen(infile, "r");

I think this is declaring a pointer of data type FILE, but what is it? I've never encountered it.

1

The FILE data type is a structure that handles working with files. Variables of this type are opened as pointers. It contains such information as the name and location of the file, whether the file is opened for read, write or append, the current position in the file, etc.

You can google "file type in c" and see more.

If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)

You must log in to answer this question.

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