Page 278 - DCAP404 _Object Oriented Programming
P. 278
Yadwinder Singh, Lovely Professional University Unit 13: Working with Files
Unit 13: Working with Files Notes
CONTENTS
Objectives
Introduction
13.1 Data Streams
13.2 Opening a File
13.3 Reading/Writing a Character from/into a File
13.4 Appending
13.5 Processing and Closing a File
13.6 Different Types of Files
13.6.1 Types of File Systems
13.6.2 File Systems and Operating Systems
13.6.3 Binary Files
13.7 Command Line Arguments
13.8 Summary
13.9 Keywords
13.10 Review Questions
13.11 Further Readings
Objectives
After studying this unit, you will be able to:
Demonstrate the opening a file
Recognize the reading and writing in a file
Describe the appending in a file
Explain the processing and closing a file
Discuss the different types of files
Discuss the command line arguments
Introduction
Programs often input data from reading from a data file and output the result into another
(or same) data file. This unit will focus on issues related to accessing data from a data file
through a C++ program.
13.1 Data Streams
Programs would not be very useful if they cannot input and/or output data from/to users. Some
programs that require little or no input for their execution are designed to be interactive through
LOVELY PROFESSIONAL UNIVERSITY 271