Question: Please help me change fgetc to fgets !!!! and explain a little bit please #include #include void printFileContents(char *fileName) FILE *fptr = fopen(fileName, r); if

Please help me change fgetc to fgets !!!! and explain a little bit please

Please help me change fgetc to fgets !!!! and explain a little

#include #include void printFileContents(char *fileName) FILE *fptr = fopen(fileName, "r"); if (fptr NULL) printf("Cannot open file %s ", fileName); return /l Read contents from file char by char, and print char c - fgetc(fptr); while (c!- EOF) printf ("%C", c); c fgetc(fptr); int main(int argc, char *argv[l) // there are (argc-1) params of files, we can read and print int I for(i-1; ikargc; i+) printf(" Processing File %s ", argv[i]); printFileContents(argvli])

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!