C program to convert the file contents in Upper-case & Write Contents in a output file
Write a program to read a text file and convert the file contents in capital (Upper-case) and write the contents in a output file. Program to copy the contents of one file into another by changing case.
#include<stdio.h> #include<process.h> void main() { FILE *fp1,*fp2; char a; clrscr(); fp1=fopen("test.txt","r"); if(fp1==NULL) { puts("cannot open this file"); exit(1); } fp2=fopen("test1.txt","w"); if(fp2==NULL) { puts("Not able to open this file"); fclose(fp1); exit(1); } do { a=fgetc(fp1); a=toupper(a); fputc(a,fp2); }while(a!=EOF); fcloseall(); getch(); }
Incoming search terms:
- program to copy the text file into another file in upper case (2)
- how to read file data in uppercase in c (1)
- modify comments to uppercase in a c file (1)
- program to change the content of fileinto upper (1)
- program to convert file to upper case in c (1)
- a program that reads txt file coverting into uppercase writes to other txt (1)

