i wrote a program to take text from a file of my choice named "data" and print it out on the screen, how can i tweak this so taht when the text comes out , it would be all in upper case using toupper??
this is the code
#include <stdio.h>
#include <ctype.h>
int main () {
char ch;
char abc;
FILE*cfptr=fopen("data.txt" , "r");
ch=fgetc(cfptr);
while (ch!= EOF){
printf ("%c", ch);
ch=fgetc(cfptr);
}
fclose (cfptr);
printf ("%c", ch);
scanf ("%c", abc); //keeps output on screen
return (0);
}
thanks