© 2014 Firstsoft Technologies (P) Limited. login
Hi 'Guest'
Home SiteMap Contact Us Disclaimer
enggedu
Quick Links
Easy Studies

CPP Program For File I/O Using File Stream
#include #include #include #include #include int main() { char name[30],file[30],*blank=".html"; char temp[200],ch; int num=0,len,i,line=1; clrscr(); cout<<"Enter Name Of The Database : "; gets(name); strcpy(file,name); strcat(file,blank); ofstream fout(file); if(!fout) { cout<<"Error In Making Of A File :"; exit(1); } fout<<""; fout<<""; fout<<"
"; fout<<"

"<<"CURRICULAM VITAE"<<"

"; fout<<"
"; cout<<"Enter Your Name : "; gets(temp); strcpy(name,temp); fout<<"

"<"; cout<<"Enter Your Address : "; gets(temp); len=strlen(temp); for(i=0;i"; num=0; } fout<Contact No : "<

"; cout<<"Enter Your Objective : "; gets(temp); fout<<"Objective : "; len=strlen(temp); for(i=0;i"; num=0; } fout<
"; cout<<"Enter Your Academic Record :"; fout<<"Academic Record
"; do { x:cout<<""<"; for(i=0;i "; num=0; } fout<>ch; line++; num=0; if(ch=='*')goto x; }while(ch!='$'); line=1; num=0; cout<<"Enter Your Hobbies : "; gets(temp); fout<<"

Hobbies : "<
Languages Known : "<>ch; if(ch=='$') { goto a; } else { fout<<"

Experience "; do { y:cout<<" "<"; for(i=0;i "; num=0; } fout<>ch; line++; num=0; if(ch=='*')goto y; }while(ch!='$'); } line=1; num=0; a:cout<<"Technical Skills :"; cout<<"If You Want To Bypass This Information Press $ Sign Or AnyOther Key To Continue : "; cin>>ch; if(ch=='$') { goto b; } else { fout<<"

Technical Skills
"; do { z:cout<<" "<"; for(i=0;i "; num=0; } fout<>ch; line++; num=0; if(ch=='*')goto z; }while(ch!='$'); } line=1; num=0; b:cout<<"In The End Enter Your Personal Details :"; fout<<"

Personal Details

"; cout<<"Fathers Name : "; gets(temp); fout<<"Fathers Name : "<Date Of Birth : "<Martial Status : "<Sex :   "<Permanent Address : "; fout<<"
"; gets(temp); len=strlen(temp); for(i=0;i"; num=0; } fout<"; fout<<"
"; fout<<"Date : "; fout<<"
Place : "; fout<<"

("<"; fout<<""; fout<<""; cout<<"End Of Your CV Press Any Key To Continue : "; getch(); fout.close(); return 0; }

Sample Input Output :

Enter Name Of The Database : nagul
Enter Your Name : nagul
Enter Your Address :  chennai
Enter Your Contact Number : 64646464
Enter Your Objective :  BE
Enter Your Academic Record :1. noise reduction
If you Want To Add More Information Press * Sign Or Quit To $:$
Enter Your Hobbies : playing cabady
Languages Known : tamil
Enter Your Experience :If You Want To Bypass This Information Press $ Sign Or An
y OtherKey To Continue : $
Technical Skills  :If You Want To Bypass This Information Press $ Sign Or AnyOth
er Key To Continue :

c
 1. c
If you Want To Add More Information Press A * sign Or Quit To$$
In The End Enter Your Personal Details :Fathers Name : periyasamy
Enter Date Of Birth : 5 4 1985
Enter Martial Status :single
Sex :male
Permanent Address : perambur
End Of Your CV Press Any Key To Continue :

 
SLogix Student Projects

⇓Student Projects⇓
⇑Student Projects⇑
bottom