I'm having trouble in this exercise here.
Code software that, from an original text file, generate another file with the text content in upper case.
For exemple:
entrence:
luke
tom
alex
outings:
LUKE
TOM
ALEX
My code so far:
Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
char variable;
FILE *file, *file2;
file = fopen("arquivo.txt","r");
if (file == NULL)
printf("error the file was not open\n");
else {
while ( (variable = fgetc(file)) != EOF)
putchar(file);
printf("its ok");
}
return 0;
}