formatted input output functions in files.pptx
formatted input output functions in files.pptx
Presented by:
Mrs. A. A. Shaikh
Lecturer in Information
Technology
Contents :
•Formatted Input/Output functions in file.
Input Pointer
Output Pointer
Output Pointer
#include<iostream.h>
#include<conio.h> if(!readfile.eof())
#include<fstream.h> {
readfile>>name;
void main() readfile>>roll_no;
{ cout<<name<<roll_no;
clrscr(); }
int roll_no; readfile.close();
char name[20]; getch();
}
ofstream outfile;
outfile.open("student",ios::out);
cout<<"enter student name and roll
no:";
cin>>name>>roll_no;
outfile<<"Name:"<<name<<"roll
no"<<roll_no;
outfile.close();
ifstream readfile;
readfile.open("student",ios::in);
Presented by: Mrs. A. A. Shaikh, K. K. Wagh Polytechnic, Nashik