Question: Caesar cipher C program, caesar.c such that the letter shifting logic is in a function called shift() which has the following declaration void shift(char *ch);
Caesar cipher
C program,
caesar.c
such that the letter shifting logic
is in a function called shift() which has the following declaration
void shift(char *ch);
Your program must:
1.
Have a global variable called key where you will store the input key
.
2.Implement the above function with the letter shifting logic. Notice that the function parameter is a character pointer and returns nothing.
3.
The main() function must call shift()
function for each of the input character and print/display the final result
.
Example execution
Enter a key: 5
Enter a message: Attack at MIDNIGHT.
Output: Fyyfhp fy RNISNLMY.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
