hi buckey i need your help to understand the working of for loop in this program basically initialization,condition;increments of for loop ..
/* program to make a backup copy of text file */
#include
int main(){
FILE *inp,*outp;
char in_name[50],out_name[50],ch;
printf("enter the name of file you want to backup:");

for (scanf("%s",in_name);(inp=fopen(in_name,"r"))==NULL;
scanf("%s",in_name));{
printf("can not open %s for input re-enter the file name:\n",in_name);
}
printf("enter name for back up copy");
for (scanf("%s",out_name);
(outp=fopen(out_name,"w"))==NULL;
scanf("%s",out_name));
{printf("can not open %s for output re-enter file name:\n",out_name);
}
/*make a backup 1 char at a time*/
for (ch=getc(inp);ch !=EOF;ch=getc(inp))
putc(ch,outp);
fclose(inp);
fclose(outp);
printf("copied %s to %s \n",in_name,out_name);
return 0;

}