14.1 INTRODUCTION

A computer can store alphanumeric data, sound, graphic images, etc. as files. The files are stored on various mediums such as hard disks, CDs, pen-drive, etc. The ability of the computer to retrieve the contents has revolutionized applications in almost every aspect of life. Therefore, Life without files is unimaginable. Even the programs, which we write, are kept in a file. We write our programs in ".cpp" file, which is a text file. We compile our programs and create ".exe" file, which is a binary file. It can be executed (run). A file is nothing but a sequential collection of bytes (a byte is a unit of memory consisting 8 bits) and stored with a name.

In DOS and Windows Operating system, file names have optional extension. ...

Get Object Oriented Programming with C++, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.