2078 7

BIT102 ยท 2078 ยท 5 marks

Write a program to create a file "duplicate" that contains the exact copy of file "original".

Write a program to create a file "duplicate" that contains the exact copy of file "original". [5]

C ProgrammingChapter 10: File Input Output and PreprocessorFile creation and copying

--- Step Description ------------------- fopen("original", "r") Opens the source file "original" in read mode fopen("duplicate", "w") Creates/opens the destination file "duplicate" in write mode NULL check Verifies files opened successfully; exits with error if not fgetc(original) Reads one chara...