boost learn study
Tuesday, April 1, 2014
Copy One File to another File
Home
�
C File Input/Output
�
Copy One File to another File
#include
#include
void main() { FILE *p,*p2; char ch; clrscr(); printf("Enter the Lines"); p = fopen("Student.txt","w"); while((ch=getchar()!=EOF) { putc(ch,p); } fclose(p); p = fopen("Student.txt","r"); p2 = fopen("Teacher.txt","w"); while((ch=getc(p))!EOF) { putc(ch,p2) } fclose(p); fclose(p2); } p = fopen =("Student.txt","r"); while((ch=getc(p))!EOF) { printf("%c",ch); } fclose(p); p2 = fopen =("Teacher.txt","r"); while((ch=getc(p2))!EOF) { printf("%c",ch) } fclose(p2); getch(); }
Read more �
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment