here is an update I am at least writing to file now. except my output is MAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA and so on.
Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#define MAXCHAR 250
int main(void)
{
int c; /* for return value of fgetc */
FILE *fp, *fp2;
char filename[MAXCHAR];
printf("Enter the name of the file to open\n");
fgets(filename, MAXCHAR, stdin);
filename[strlen(filename) - 1] = '\0';
fopen(filename,"r+");
if (!(fp = fopen(filename, "r+")))
{
printf("Unable to open %s\n", filename);
exit(EXIT_FAILURE);
}
while((c = fgetc(fp)) != EOF)
{
c=toupper(c);
fseek(fp,-1L,SEEK_SET);
fputc(c,fp);
}
fclose(fp);
printf("\n\nThe file has been converted to all Capital letters.\n\n\n");
system("Pause");
return 0;
}