Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise: Encrypting Text with a Caesar Cipher (pair) This is a pair exercise to complete with your lab partner. Write a C program caesar.c which

image text in transcribed

Exercise: Encrypting Text with a Caesar Cipher (pair) This is a pair exercise to complete with your lab partner. Write a C program caesar.c which reads characters from its input and writes the characters to its output encrypted with a Caesar cipher A Caesar cipher shifts each letter a certain number of positions in the alphabet. The number of positions to shift will be given to your program as a command line argument. Characters other than letters should not be encrypted Your program should stop only at the end of input. Your program should contain at least one function other than mairn For example: /caesar 1 This life well it's slipping right through my hands Uijt mjgf xfmm ju't tmjqqjoh sjhiu uispvhi nz iboet These days turned out nothing like I had planned Ctrl-a $ ./caesar 10 abcdefghijklmnopqrstuvwxyz klmnopqrstuvwxyzabcdeIghij ABCDEFGHIJKLMNOPQRSTUVWXYZ KLMNO ORSTUVWXYZABCDEFGHIJ Ctrl-d s ./caesar -42 Control well it's slipping right through my hands Myxdbyv govv sd'c cvszzsxq bsqrd drbyeqr wi rkxnc These days? Droco nkic? Ctrl-d Hint: handle upper and lower case letters separately Hint: use % Hint: use atoi to convert the first command-line argument to an int. Hint:make sure you understand this example program which uses a atoi to convert command-line arguments to an ints Hint: create a function with a prototype llke this: int encrypt (int character, int shift); which returns the character shifted by the specified amount Manually Cracking a Caesar Cipher Here is some (New Zealand) English text that has been encrypted with a Caesar cipher. Z uf dp drbvlg zo jfdvsfup vcjv'j tri 7 hefn rsflk nyrk pfl uzu reu 7 nreer jtivrd kyv kilky

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

Database Design Application Development And Administration

Authors: Michael V. Mannino

4th Edition

0615231047, 978-0615231044

More Books

Students also viewed these Databases questions

Question

9. Power and politics can be destructive forces in organizations.

Answered: 1 week ago