There can be many reasons to use files.The first and foremost reason is need of permanency of storage of data.If we want to preserve the output of any program for future use, it is not possible without files.All messages or values printed with help of any output statements like printf, putchar, etc. are never available for future use and the only solution in that case is to write the output in files.Similarly, if there is a large amount of data generated as output by a program, storing that output in file will help in easy handling/analysis of the output, as user can see the whole output at any time even after complete execution of the program.
The above situations explain the need of output files.The input files are also equally important and useful.if a program needs a lot of data to be inputted, user cannot keep on typing again and again for repeated execution of the program.In that case, all input data can be once written in a file and then that file can be easily used as the input file.moreover the transfer of input-data and/or output-data from one computer to another can be easily done by using files.
Saturday, January 9, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment