Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

C Programming. I was given this code to input into Windows Visual Studio. The ou

ID: 3717480 • Letter: C

Question

C Programming.
I was given this code to input into Windows Visual Studio.
The output has to be the dupfile shown.
I need someone to help me modify it to properly compile. it says I need to use fopen_s and when I change it then it says "too few arguments for call". also it tells me to use fscanf_s. nothing seems to work. please help.

This program makes a duplicate copy of a file. ( reads input from a file and write output to another file) #include stdio.h> 2 int main() 3 FILE *infile; FILEoutfile; int age; char namel20]: infile fopen("a:myfile.txt","r"); outfile fopen("a dupfile.dat".,"w"); 10 if (infile NULL) printf"File does not exist. n") 12 13 else printf"Program execution successful.In"); while (fscanf(infile, "%s%d", name, &age;) !-Eon 14 15 16 fprintf(outfile,"%s1%don", name, age); 17 18 fclose(infile); 19 fclose outfile) 20 21 return (0); lIl create text file: Start- Programs- Accessories - NotesPad

Explanation / Answer

Do it this way