Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

image text in transcribed

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MySQL/PHP Database Applications

Authors: Jay Greenspan, Brad Bulger

1st Edition

978-0764535376

More Books

Students also viewed these Databases questions

Question

Discuss the limitations that affect financial statement analysis.

Answered: 1 week ago