C PROGRAMMING
MULTIPLE CHOICE QUESTION
OLD QUESTION BANK
SAMPLE QUESTION 2080 AND SOLUTION

Introduction

A collection of data which is stored on a secondary device like a hard disk is called as a file. A file is generally used as real-life applications that contain a large amount of data. Therefore, the file is a place on the disk where a group of related data is stored.

Why files are needed?

  • When a program is terminated, the entire data is lost. Storing in a file will preserve your data even if the program terminates.
  • If you have to enter a large number of data it will take a lot of time to enter them all. However, if you have a file containing all the data, you can easily access the contents of the file using few commands in C.
  • You can easily move your data from one computer to another without any changes.