hej mam napisać program ktory czyta zawartosc pliku jednak po odczytaniu pojawiaja mi sie znaki zaptania
#include <stdio.h>
#include <stdlib.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char *argv[]) {
int ch;
FILE *fp;
char nazwa[50];
printf("Podaj nazwe pliku: ");
scanf("%s",nazwa);
fp=fopen(nazwa,"r");
if(fp==NULL){
printf("BLAD");
exit(1);
}
while(ch=getc(fp)!=EOF){
putchar(ch);
}
fclose(fp);
return 0;
}