Class 12 Data File Handling In C++ Revision Notes

Read and download free pdf of Class 12 Data File Handling In C++ Revision Notes. Students and teachers of Class 12 Computer Science can get free advanced study material, revision notes, sure shot questions and answers for Class 12 Computer Science prepared as per the latest syllabus and examination guidelines in your school. Class 12 students should download this study material which will give them more knowledge for all chapters in Computer Science and all important topics which are scoring and can get you more marks. Students should also download free pdf of Chapter wise Notes for Class 12 Computer Science prepared by school teachers as per the latest NCERT, CBSE, KVS books and syllabus issued this year and also download free worksheets and question papers available here to get higher scores in school exams and tests, also click here for more Study Material for Class 12 Computer Science

Study Material for Class 12 Computer Science Data File Handling In C++

Class 12 Computer Science students should refer to the following Pdf for Data File Handling In C++ in Class 12. These notes and test paper with questions and answers for Class 12 Computer Science will be very useful for exams and help you to score good marks

Class 12 Computer Science Data File Handling In C++

File: - The information / data stored under a specific name on a storage device, is called a file.
Stream: - It refers to a sequence of bytes.
Text file: - It is a file that stores information in ASCII characters. In text files, each line of text is terminated with a special character known as EOL (End of Line) character or delimiter character.
When this EOL character is read or written, certain internal translations take place.
Binary file:- It is a file that contains information in the same format as it is held in memory. In binary files, no delimiters are used for a line and no translations occur here.
Classes used for different file related operation
ofstream: Object of ofstream class used to write data to the files.
ifstream: Object of ifstream class used to read from files
fstream: Object of fstream class used to both read and write from/to files.
 
Opening a file

Opening file using constructor
ofstream outFile("sample.txt");      //output only
ifstream inFile(“sample.txt”);        //input only
Opening File Using open ()
StreamObject.open(“filename”, [mode]);
ofstream outFile;
outFile.open("sample.txt");
ifstream inFile;
inFile.open("sample.txt");
 
Class 12 Data File Handling In C++ Revision NotesAll these flags can be combined using the bitwise operator OR (|). For example, if we want to open the file example.dat in binary mode to add data we could do it by the following call to member
function open():
fstream file;
file.open ("example.dat", ios::out | ios::app | ios::binary);
Closing File
outFile.close();
inFile.close();
 
Input and output operation

put() and get() function
the function put() writes a single character to the associated stream. Similarly, the function get()
reads a single character form the associated stream.
example :
 

CBSE Class 12 Computer Science Data File Handling In C++ Study Material

We hope students liked the above Study Material for Data File Handling In C++ designed as per the latest syllabus for Class 12 Computer Science released by CBSE. Students of Class 12 should download the Study Material in Pdf format, read the notes and related questions and solutions given in above Class 12 Computer Science Study Material on daily basis. All latest Study Material have been developed for Computer Science by referring to the most important and regularly asked topics which the students should learn and practice to get better score in school tests and examinations. Expert teachers of studiestoday have referred to NCERT book for Class 12 Computer Science to develop the Computer Science Class 12 Study Material. After solving the questions given in the Study Material which have been developed as per latest course books also refer to the NCERT solutions for Class 12 Computer Science designed by our teachers. Also download Class 12 Computer Science Sample Papers given on studiestoday. After solving these you should also refer to Class 12 Computer Science MCQ Test for the same chapter.

 

How to download CBSE Class 12 Computer Science Data File Handling In C++ study material

You can download free study material for Class 12 Computer Science Data File Handling In C++ for latest academic session from StudiesToday.com

Is the study material for Data File Handling In C++ Class 12 Computer Science for the latest CBSE academic session

Yes, the study material given here for Class 12 Computer Science Data File Handling In C++ is for current CBSE session

Is there any charge for Class 12 Computer Science Data File Handling In C++ concepts and study material

All study maetrial for CBSE Class 12 Computer Science Data File Handling In C++ is free