File_Processing(英文版)(ppt 44頁)
File_Processing(英文版)目錄:
1、Data and Data Files
2、Files and Streams
3、Sequential Access Files
4、Random Access Files
File_Processing(英文版)內容提要:
Data Files can be created, updated, and processed by C programs used for permanent storage(持久存儲) of large amounts of dataStorage of data in variables and arrays is only temporary(臨時的)
All such data are lost when the program terminates
Record – group of related fieldsRepresented by a struct (or a class in C++)Example: In a payroll system, a record for a particular employee that contained his/her identification number (possible record key), name, address, etc.
A Stream is created when a file is openedProvide communication channel(通信渠道) between files and programsOpening a file returns a pointer to a FILE structure
Example file pointers:
stdin - standard input (keyboard)
stdout - standard output (screen)
stderr - standard error (screen)
..............................