So here is my attempt at it but I'm getting a few errors which I don't know how to fix. 17.2 Warning : passing argument 2 of putc makes pointer from integer without a cast. C:\mingw ....... note expected Struct FILE* but' but argument is of type int.
#include <stdio.h>
#include <stdlib.h>
int main (void) {
FILE *fp;
int c;
char copywords;
fp = fopen("gues20.txt", "r");
if (fp == NULL)
exit(1);
c = getc(fp);
while(c != EOF)
{
putc(c, copywords);
c = getc(fp);
}
printf("%d", copywords);
}