subject

Your program will contain 3 functions - main, Encrypt and Decrypt. All user interactivity (i. e. cin / cout) should be limited to within main only.
Your Encrypt function will take two parameters - a char pointer to an input string and an integer value called secret code - and return a char pointer. Use the function prototype: char* Encrypt(char* input, int secret);
Similarly, your Decrypt function will take two parameters - a char pointer to an encrypted string and an integer value called secret code - and return a char pointer. Use the function prototype: char* Decrypt(char* encrypted, int secret);
In your main, your program will first ask the user for an integer value that will be used as the secret to encrypt or decrypt the text. Provide an clear prompt to get the value.
Pass the input string from main using pointers and secret code to the Encrypt function to encode the input string by
Declaring a new character array in your function where you will copy the contents of the input array either before or during the following actions.
Down shifting (i. e. moving in the increasing direction) each character in the ASCII character-set by the number of the secret code, followed by
Reversing the characters in the shifted string
Do not use either C-string or C++ string helper functions.
There should be no user interactivity in the function.
Return the pointer to the new character array to the main.
In the main, the pointer returned by the Encrypt function should be stored in an appropriate variable named encrypted and then passed as an argument to the Decrypt function.
Pass the encrypted string from main by pointers and secret code to the Decrypt function to decode the string by
Declaring a new character array in your function where you will copy the contents of the encrypted array either before or during the following actions.
Reversing the characters of the string
Up shifting (i. e. moving in the decreasing direction) each character of the reversed string by the number of the secret code
Do not use either C-string or C++ string functions.
There should be no user interactivity in the function.
If decrypted correctly, it should change back to the original string input by the user.
Return the pointer to the new character array to the main.
In the main, the pointer returned by the Decrypt function should be stored in an appropriate variable named decrypted.
End the main by printing the original input string, the encrypted string and decrypted string. All three should be printed only after both Encrypt and Decrypt are finished. See the sample output below on what to print.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 18:30
Which of the following commands is more recommended while creating a bot?
Answers: 1
question
Computers and Technology, 22.06.2019 22:50
Assume the existence of a bankaccount class. define a derived class, savingsaccount that contains two instance variables: the first a double, named interestrate, and the second an integer named interesttype. the value of the interesttype variable can be 1 for simple interest and 2 for compound interest. there is also a constructor that accepts two parameters: a double that is used to initialize the interestrate variable, and a string that you may assume will contain either "simple", or "compound", and which should be used to initialize the interesttype variable appropriately. there should also be a pair of functions getinterestrate and getinteresttype that return the values of the corresponding data members (as double and int respectively).
Answers: 2
question
Computers and Technology, 23.06.2019 09:30
Facial expressions and gestures are examples of messages.
Answers: 3
question
Computers and Technology, 23.06.2019 12:00
3. when you right-click a linked spreadsheet object, what commands do you choose to activate the excel features? a. linked worksheet object > edit b. edit data > edit data c. linked spreadsheet > edit d. object > edit data
Answers: 2
You know the right answer?
Your program will contain 3 functions - main, Encrypt and Decrypt. All user interactivity (i. e. ci...
Questions
question
Mathematics, 29.10.2020 17:20
question
Social Studies, 29.10.2020 17:20
question
Mathematics, 29.10.2020 17:20