{{keywords>wiki library source code example reference}} ===== FILE ===== FILE Pointer (stream) shows on a given file The data type FILE is a structure that contains information about a file or specified data stream. It includes such information as a file descriptor, current position, status flags, and more. It is most often used as a pointer to a file type, as file I/O functions predominantly take pointers as parameters, not the structures themselves (see example below). ===== C Sourcecode Example ===== #include /* including standard library */ //#include /* uncomment this for Windows */ int main (void) { FILE *filestream; filestream=fopen("test.txt","r"); if (filestream == NULL) perror("cannot open file"); fclose(filestream); return 0; }