Unformatted text preview: a variable so make sure to initialize it so that it does not hold a garbage value. NULL value is a constant 0. Now, need to give pointer the address of a variable. Fopen opens the named file and returns the address FILE*fopen(const char file_name, const char mode); Fopen returns NULL if it fails to connect to the file Pt = fopen(“filename.txt”, “mode”); gives address of the file to the pointer a=write to the end of the file to open a file in write mode: fp = fopen(“alpha.txt”, “w”); never read end of file – we always read from end of file backwards. If want to read past end of file, use feof(fp)==0 go to end of file...
View Full Document
- Fall '10