8 - ICS 103: Computer Programming in C Handout-8 Topic:...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
ICS 103: Computer Programming in C Handout-8 Topic: Data Files. Objective: To know why  Data Files are  needed. To Know How to Use  Data Files for Input. To Know How to Use  Data Files for Output.  What is the Need of Data File ? : Data files are two types:  one is input data file and another is output data file. If you want that your  input data should  be permanently store in input data file and you want to  use this data file at any later time. For this first create  input data file    in some secondary storage device then input data  and save  data  in this input  file permanently  (in place of simply taking  data temporarily from keyboard)  doing this our input data will be permanently stored in this input data file  and we can simply use  this file any time. Similarly we can save our outputs in Output data file  permanently in place of simply displaying  outputs only on the screen of computer . Important Statements/Functions for handling I/O Data files : List of Some useful Functions/Statements and their purpose is explained below : FILE *inp, *outp;   // Makes cells named inp and outp for storage of file pointers. inp=fopen( “num.dat”, “r”);
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/09/2010 for the course ICS 102 taught by Professor Zaman during the Spring '10 term at Abilene Christian University.

Page1 / 4

8 - ICS 103: Computer Programming in C Handout-8 Topic:...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online