Question: Hello all, I am currently writing a code for an assignment I have and was just needed some help resolving an issue. When compiled, my

Hello all, I am currently writing a code for an assignment I have and was just needed some help resolving an issue. When compiled, my write document is full of endless "" character. Any help would be appreciated.

#include #include

int main() { FILE * fPointer_Read; FILE * fPointer_Write;

fPointer_Read = fopen("pj3read.txt","r"); fPointer_Write = fopen("pj3write.txt","w");

char singleLine[150]; char write_variable;

int count = 1;

while(fgets(singleLine, sizeof(singleLine), fPointer_Read)){ printf("%03d: %s", count++, singleLine); }

do{ write_variable = fgetc(fPointer_Read); fputc(write_variable, fPointer_Write); }while (write_variable = EOF);

return 0;

}

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!