ACP4_5

//BCA Support //www.bcasupport.xyz #include <stdio.h> void main() { FILE *fpr,*fpw; char file1[13],file2[13]; char ch; int a=-1; clrscr(); printf("\nEnter file name : "); gets(file1); printf("\nEnter file to copied to in reverse : "); gets(file2); fpr=fopen(file1,"r"); if(fpr==NULL) { printf("\nFile not found."); getch(); exit(); } fpw=fopen(file2,"w"); if(fpw==NULL) { printf("\nError in creating file."); getch(); exit(); } while(!feof(fpr)) { fseek(fpr,a--,2); ch=fgetc(fpr); fputc(ch,fpw); } printf("\nCopied successfully."); fcloseall(); getch(); }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.