Answered step by step
Verified Expert Solution
Question
1 Approved Answer
// Problem 5: encryptStrings (5 points) // Use pointer ptr to traverse the 2D character array 'strings' and encrypt each string in 2 step as
// Problem 5: encryptStrings (5 points) // 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 'reverseStringsO 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 "qnnfj. // 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 reverseStrings0, skip using it in this function. You will receive partial credit. void encryptStrings(char strings[NUM _STRINGSIISTRING_LENGTH], int key) char p 8strings(0][O: /Ienter code here // Problem 6: decryptStrings (5 points) // HINT: This should be very similiar to the encryption function defined above in encryptstrings. /I Use pointer p to traverse the 2D haracter 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 'reverseStrings0' for this step // NOTE: DO NOT decrypt the null characters. If you could not implement reverseStrings0, skip using it in this function. You will receive partial credit. void decryptStrings(char strings[NUM _STRINGSIISTRING LENGTH], int key) char ptr &strings[0[O]: /Ienter code here
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started