Programming tutorials (AKSZ)
Monday, 20 February 2017
Friday, 3 July 2015
File handling in Detail
What
is file handling? Why we use file
handling.
Files permanently.
Before the A file is a collection of related records. A
record contains data about an entity. A file can be used to save any type of
data. Files are stored on secondary storage. The data is stored in start of
using database management system, file handling is used to store data entered
through C++ programs.
Normally when we enter data through C++ programs, it is stored in
variables. If data is long then it can not be entered again and again. There
are certain chances of errors and mistakes while we enter data again and again.
When program ends, the data entered through C++ programs will be lost. Because
they are stored temporarily in variables.
To store our data permanently on secondary storage devices
in a file through C++ programs is called File handling. There are various streams are available to
read and write data to and from the files. fstream, Ifstream,Fstream classes are used to
input data and read data from files.
Ofstream class is used to write on files.
Ifstream class is used to read from files.
Fstream class is used to both read and write data to and
from files.
The
file should be opened before it can be accessed. A file pointer is declared and
associated with the file to be opened. A file can be opened by first creating
an object of ifstream, ofstream, fstream. The object is then associated with
the physical file. An open file is represented by a stream object in a program.
Any input and output operation performed on this stream object is applied to
the physical file associated to it. It helps us to store our data permanently
into files and can be read when ever required.
Tuesday, 27 January 2015
Nested IF Programs
1.Nested-IF Program For Enter three numbers from the user to get display which one is greater number ....
2.Nested-IF Program For Enter three numbers from the user to get display which are equal or Different number ....
Download Nested-IF Equal or Different Program from Click here......
Monday, 26 January 2015
Thursday, 27 November 2014
Switch Program
1.Switch program for Enter number from the user to get display days...
Download switch program from Click here......
2. Switch Program Enter year from user to get display it's leap year or not Leap year...
Download Switch program from Click here.....
3.Switch Program Enter a character from user to get display it's vowels or consonant.....
Download Switch program from Click here.....
Subscribe to:
Posts (Atom)






