a C program that simulates a different version of Unix?s diff command

Part II- D

? Write a C program that simulates a different version of Unix?s diff command (to be called diffnew.c). For example, given two text files file1.txt and file2.txt:
diffnew file1.txt file2.txt flag
returns:
o Zero (0) if the two files are exactly identical
o -1 if either one of the two files is missing or cannot be opened, or an illegal flag value is used. Provide an explanation of the encountered error.
o A positive integer indicating:
the number of characters that are different in the two files (if 1 flag is used)
the number of words that are different in the two files (if 2 flag is used)

Example output would look like:

Files contain 15 different characters.

Previous answers to this question


This is a preview of an assignment submitted on our website by a student. If you need help with this question or any assignment help, click on the order button below and get started. We guarantee authentic, quality, 100% plagiarism free work or your money back.

order uk best essays Get The Answer
Uncategorized

a C program that simulates a different version of Unix?s diff command

Part II- D

Write a C program that simulates a different version of Unix s diff command (to be called diffnew.c). For example, given two text files file1.txt and file2.txt:
diffnew file1.txt file2.txt flag
returns:
o Zero (0) if the two files are exactly identical
o -1 if either one of the two files is missing or cannot be opened, or an illegal flag value is used. Provide an explanation of the encountered error.
o A positive integer indicating:
the number of characters that are different in the two files (if 1 flag is used)
the number of words that are different in the two files (if 2 flag is used)

Example output would look like:

Files contain 15 different characters.

Previous answers to this question


This is a preview of an assignment submitted on our website by a student. If you need help with this question or any assignment help, click on the order button below and get started. We guarantee authentic, quality, 100% plagiarism free work or your money back.

order uk best essays Get The Answer
Uncategorized