NCERT Solutions for class 12 Data File Handling

The chapter data file handling is about learning about handling data and files. At first, the students will be taught about what is file, stream, text file and binary file.

Classes for file stream operation

ifstream: Stream class to read from files.

fstream: To read and write to/from files.

ofstream: To write on files.

Opening a File

Opening file using constructor

Output Only – ofstream outFile(“file.txt”);

Input Only – iffstream inFile(“file.txt”);

Closing a File



To learn the concepts of file handling and to score good marks in the exam students are advised to solve the exercise questions provided in the book. To help students we have also provided the NCERT solutions for class 12 Data File Handling.

Download NCERT Solutions for Class 12 Computer Science Data File Handling

Leave Your Answer