This is my first program, but my teacher ask me to recode the program that will count the number of upercase letter in a text file... I know that I have to use strlwr?? but its so confusing.. HELP ME!!
I wish someone know this...
Code:
#include<stdio.h>
void main(void)
{
FILE *inputf;
char filename[40];
nt c;
printf("Input name of the text file");
scanf("%s",filename);
if (inputf = fopen(filename, "r") == NULL)
{
printf("ERROR: %s cannot be opened.\n", filename);
exit(1);
}
while ((c = fgetc(inputf)) != EOF) fputc(c, stdout);
fclose(inputf);
}
THANKS FOR THE HELP GUYS...