Question: / / Problem 6 : decryptStrings ( 5 points ) / / HINT: This should be very similiar to the encryption function defined above in

// Problem 6: decryptStrings (5 points)
// HINT: This should be very similiar to the encryption function defined above in
// encryptStrings().
// Use pointer p to traverse the 2D character array 'strings' and decrypt each
// string in 2 step as follows -
//1) Shift the characters backward by the integer value of 'key'.
//2) Reverse the strings. Hint: Use 'reverseStrings()' for this step.
// NOTE: DO NOT decrypt the null characters.
// If you could not implement reverseStrings(), skip using it in this
// function.You will receive partial credit.
void decryptStrings(char strings[NUM_STRINGS][STRING_LENGTH], int key)
{
// Use pointer ptr to traverse the 2D character array 'strings' and encrypt each
// string in 2 step as follows -
//1) Reverse the strings. Hint: Use 'reverseStrings()' for this step.
//2) Shift the characters forward by the integer value of 'key'.
// If the string is "hello" and key =2, reversing will get you "olleh" and adding
// key to it will result in "qnngj".
// Once the value of 'key' gets larger, you will extend past alphabetical
// characters and reach non - alphabetical characters.Thats ok.
// NOTE: DO NOT encrypt the null terminator character. Use the null terminator to
// find the end string.
// If you could not implement reverseStrings(), skip using it in this
// function.You will receive partial credit

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 Programming Questions!