Question: Hi, I need help with my C++ problem Using the code below as a template. Define the functions: void reverseOrder(char chArr[],string str); and string upperCaseMyString(string

Hi, I need help with my C++ problem

Using the code below as a template. Define the functions:

void reverseOrder(char chArr[],string str);

and

string upperCaseMyString(string str);

"reverseOrder" should write the string given by parameter "str" in reverse order into the char array "chArr"

"upperCaseMyString" should return the input string in all uppercase letters.

Only use the libraries and to accomplish this program.

HINT: Use function toupper(char) provided by the library.

If you really want you can use a characters ASCII value to figure out how to uppercase it but that is not necessary.

Use the code below as a template. You should only need the variables provided and not use any extra parameters.

#include

#include

using namespace std;

//TODO:

//DEFINE THIS FUNCTION

void reverseOrder(char chArr[],string str);

//TODO:

//DEFINE THIS FUNCTION

string upperCaseMyString(string str);

int main(){

string inputStringAnyCase;

string upperCaseString;

char reversedCharArray[50];

int stringLength;

//TODO

//READ IN A STRING WITH getLine FUNCTION

//LOOP UNTIL A STRING UNDER 50 CHARACTERS IS ENTERED

//TODO

//CALL upperCaseMyString AND STORE IN upperCaseString

//TODO

//PRINT THE UPPER CASE STRING

//HINT: SHOULD BE ONE LINE

//TODO

//CALL reverseOrder

//TODO:

//PRINT reversedCharArray IN MAIN. DON'T CALL A NEW FUNCTION

//DON'T PRINT BLANK CHARACTERS NOT INCLUDED IN THE INPUT STRING

//HINT: FOR LOOP, DONT USE endl UNTIL THE LOOP IS OVER

}

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