Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

la rints the number of occurrences of each vowel to stdout. Exercise 5.9. Write a program, called hide, according to the following spec ification: (1)

image text in transcribed
image text in transcribed
la rints the number of occurrences of each vowel to stdout. 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. 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 ./hide encrypt msg.txt msge.txt would produce the following cyphertext in file msge.txt if hide is using a shift of 12: mffqzfuaz tayq bxmzaf efab bdqbmdq uzhmeuaz efab qmdft ue dubq rad ft fmwuzs efab og eaaz rgxx efab

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_2

Step: 3

blur-text-image_3

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

Database Development For Dummies

Authors: Allen G. Taylor

1st Edition

978-0764507526

More Books

Students also viewed these Databases questions