Question: C Programming Assignment - Caesar Cipher in C Assignment Requirements: Implement a Caesar Cipher in C Your program should take a single command line argument

C Programming Assignment - Caesar Cipher in C

Assignment Requirements:

Implement a Caesar Cipher in C

Your program should take a single command line argument that defines the key

Your code should read an unencrypted message from the user and write the encrypted message to the screen

A single command line argument will define the key. Defining how many positions the letter should be shifted

You can assume that all messages are uppercase and you will not be given lowercase letters, punctuation or special characters (except space characters).

Space characters should be output without substitution. Just print them verbatim.

Your code must include a working makefile that compiles your program.

This is a simple example make file:

all:

gcc -o hw3 caesar.c

How Should Your Caesar Cipher Work?

Inputs / Outputs: Your program should take in 2 command line arguments. The first argument is the substitution key that determines of shift. A shift of two will advance all letters by two in alphabetical order, such that A becomes C, G becomes I, etc. The second command line argument should set to either e or d. The value e stands for encrypt and d stands for decrypt.

C Programming Assignment - Caesar Cipher in C Assignment Requirements: Implement a

If you selected the encryption mode, the program asks you to input the message to encrypt. The encrypted message is shown at the bottom.

Caesar Cipher in C Your program should take a single command line

If we set d for decryption mode the program will take the encrypted text and convert it back to the original message. Notice that the substitution key must be identical to successfully decrypt the message.

argument that defines the key Your code should read an unencrypted message

TEST CASES: You can use these test cases to determine whether or not your code works correctly Test #1:

from the user and write the encrypted message to the screen A

Test #2:

single command line argument will define the key. Defining how many positions

Substitution key is set to 2

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!