Question: Please solve it using C language NOT c++. 4. Write a simple encryption/decryption program. Function encrypt 0 takes a character pointer as a parameter and
4. Write a simple encryption/decryption program. Function encrypt 0 takes a character pointer as a parameter and uses pointer offset notation to change the value in the address pointed to by adding 1 to it. Function decrypt ) takes a character pointer as a parameter and uses pointer arithmetic notation to change the value in the address pointed to by subtracting 1 from it. Function maino0 inputs a string from the user using getsO, calls functions encrypt () and decrypt o and prints the encrypted and decrypted strings upon returning from each function. Sample Output: Enter your string: this ia a secret! Encrypted atring is: uijt!jtlbitfda fu" Decrypted atring is: this is a secret
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
