Question: Code in C language please help Exercise 5.9. Write a program, called hide, according to the following spec- ification: (1) It has two possible arguments:

 Code in C language please help Exercise 5.9. Write a program,

called hide, according to the following spec- ification: (1) It has two

Code in C language please help

Exercise 5.9. Write a program, called hide, according to the following spec- ification: (1) It has two possible arguments: -encrypt indicates encryption mode, while -decrypt indicates decryption mode. (2) It reads an arbitrary list of strings from stdin. (3) It applies a cypher to the strings. You may invent your own, but a simple one is to shift the letters by a constant amount (for example, 'a' becomes d', and 'z' becomes 'c'). It either encrypts or decrypts the strings ("shifts" or "deshifts" the letters) depending on the mode. (4) It prints the encrypted or decrypted text to stdout. At minimum, it should be able to handle text consisting only of lowercase letters. For example, if the message attention home planet stop prepare invasion stop earth is ripe for the taking stop cu soon full stop is in file msg.txt, then s/hide-encrypt msge.txt would produce the following cyphertext in file msge.txt if hide is using a shift of 12: mffqzfuaz tayq bxmzqf efab bdqbmdq uzhmeuaz efab qmdft ue dubq rad ftq fmvuzs efab og eaaz rgxx efab Then s/hide -decrypt

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!