Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Please solve it using C language NOT c++. image text in transcribed
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

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

Students also viewed these Databases questions

Question

Describe the operation of virtual memory management.

Answered: 1 week ago

Question

manageremployee relationship deteriorating over time;

Answered: 1 week ago