Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program with three functions: reverse, upper, lower. Like upper and lowe

ID: 3654069 • Letter: W

Question

Write a program with three functions: reverse, upper, lower.

Like upper and lower, reverse should also accept a pointer to a c-string. As it steps through the string, it should test each character to determine whether it is upper or lowercase. If a character is uppercase, it should be converted to lowercase. Likewise, if a character is upper case it should be converted to lowercase.

The upper function should accept a pointer to a c-string as an argument. It should step through each character in the string, converting it to uppercase.

The lower function, to should accept a pointer to a c-string as an argument. It should step through each character in the string converting it to lower case.

Test on a file called: catinthehat.dat

Count each character as it is read into the file and then dynamically allocate an array that will hold these characters

=>Pass the array to the functions in the following order: reverse, lower, and upper.

Explanation / Answer

#include #include #include using namespace std; char* reverse (char*, int); char* lower (char*, int); char* upper (char*, int); int main () { const int SIZE = 80; char myString [SIZE]; int strLength; //Prompt user for string cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote