CS 1325 Lecture 15:
Document Summary
Three files and their associated streams are automatically opened when program execution begins. These files are manipulated using file pointers stdin, stdout and stderr. Stdin : enables a program to read data from the keyboard. Stdout : enables a program to print data on the screen. In c, file processing consists of three steps: 3) closing the file. opens a file for appending. File is created if it opens an existing file for reading. Error if the file opens a file for writing. File is created if it doesn t . 1) to open a file, we do the following: a. Create a pointer to a file stream (defined in ) Call the fopen() function and assign the return value to that file stream pointer. i. File *fopen(const char filename, const char mode); ii. The filename parameter is a c-string that contains the file name. If the folder/directory is included we call it fullpath.