Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

copy a file into another file

–2 votes
asked Jul 3, 2018 by anonymous 1 flag

1 Answer

+1 vote
answered Jul 13, 2018 by sambhavi devi tadi
main(){

char ch;FILE *FP1,*FP2;

if(fp1=fopen("filename.c","r")){ch=fgetc(fp)}

fp2=fopen("filename2.c","r")

while(ch!=EOF){fputc(ch,fp2); ch=getc(fp1)}}
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...