{"id":4949,"date":"2018-02-20T23:50:30","date_gmt":"2018-02-20T23:50:30","guid":{"rendered":"http:\/\/essaysparlor.com\/a-c-program-that-simulates-a-different-version-of-unixs-diff-command\/"},"modified":"2017-02-20T19:08:37","modified_gmt":"2017-02-20T19:08:37","slug":"a-c-program-that-simulates-a-different-version-of-unixs-diff-command","status":"publish","type":"post","link":"https:\/\/www.benedictsol.com\/blogs\/a-c-program-that-simulates-a-different-version-of-unixs-diff-command\/","title":{"rendered":"a C program that simulates a different version of Unix?s diff command"},"content":{"rendered":"<p>\nPart II- D<\/p>\n<p>?         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:<br \/>\ndiffnew    file1.txt    file2.txt flag<br \/>\nreturns:<br \/>\no   Zero (0) if the two files are exactly identical<br \/>\no   -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.<br \/>\no   A positive integer indicating:<br \/>\nthe number of characters that are different in the two files (if 1 flag is used)<br \/>\n  the number of words that are different in the two files (if  2 flag is used)<\/p>\n<p>\nExample output would look like:<\/p>\n<p>\nFiles contain 15 different characters.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 <a href=\"https:\/\/www.benedictsol.com\/blogs\/a-c-program-that-simulates-a-different-version-of-unixs-diff-command\/\" class=\"read-more\">Read More &#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-4949","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts\/4949","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/comments?post=4949"}],"version-history":[{"count":0,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts\/4949\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/media?parent=4949"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/categories?post=4949"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/tags?post=4949"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}