there is a program called converting into upper case better you check it out.both are simmilar you'll get out the correct answer
#include<stdio.h>
#include<stdlib.h>
int main()
{
FILE*fp1,*fp2;
char ch;
fp1=fopen("source.txt","r");
if(fp1==NULL)
{
puts("file does not exist");
exit(1);
}
fp2=fopen("target.txt","w");
if(fp2==NULL)
{
puts("file does not exist");
fclose(fp1);
exit(1);
}
while((ch=fgetc(fp1))!=EOF)
{
ch=toupper(ch);
fputc(ch,fp2);
}
printf("\n file sucessfully copied");
return(0);
}0