Joined
Last Seen
0 Reputation Points
Unknown Quality Score
No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
0 Endorsements
Ranked #72.7K
#include<stdio.h> #include<stdlib.h> #include<iostream.h> #include<string.h> void main(){ FILE *fp1,*fp2; char *a,*b; int num; fp1=fopen("myfile.txt","r+"); fp2=fopen("myfile.txt","a+"); cout<<"enter the number of names you want to enter \n"; cin>>num; a=(char*)malloc(80); b=(char*)malloc(80); while(num){ gets(a); fputs("\n",fp2); fputs(a,fp2); num--; } cout<<"\n diplay the names"; while(!feof(fp1)){ fgets(b,80,fp1); cout<<b; } /* //code to search string a in file ... … |
|
hello everyone ,, have a look on the program really difficult for me to understand the concept please help |