Question: A simple questionthe test program said no newline at end of file. where should I add this instructto solve this program. and this is my
dot printf("Enter a mad-lib file name: "); fgets (name, MAX, stdin); removeLastChar (name); in fopen (name, "r"); if(ln == NULL){ printf("Unable to open file: %s . Try again! ", name); while(in == NULL); printf("Enter a file name for the resulting story:"); fgets (output, MAX, stdin) removeLastChar (output); out fopen (output, "w") char firstt' while(fscanf(in, "%s " , word4) != EOF){ replace (word4, word5); if(first 't'){fprintf(out, "%s", else{fprintf(out, "%s", word5); wo rd 5 ) ; first 'f';} fclose (out); fclose(in)i printf("InProcessing finished. Enjoy your story. In")
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
