Question: Create a flow chart for the following code:: if you could just tell me the basic steps of what this code does that would be

Create a flow chart for the following code:: if you could just tell me the basic steps of what this code does that would be appreciated

#include #include #include #include using namespace std;

const int SIZE = 80;

void upper(char[]); void lower(char[]); void reverse(char[]); int main() {

char str1[SIZE], str2[SIZE], str3[SIZE];

cout << "Enter a string: "; cin.getline(str1, SIZE);

strcpy(str2, str1); strcpy(str3, str1); cout << "After a call to Upper: "; upper(str1); cout << str1 << endl;

cout << "After a call to Lower: "; lower(str2); cout << str2 << endl;

cout << "After a call to Reverse: "; reverse(str3); cout << str3 << endl; return 0; }

void upper(char str[]) { int i = 0; while(str[i]) { str[i] = toupper(str[i]); i++; } }

void lower(char str[]) { int i = 0; while(str[i]) { str[i] = tolower(str[i]); i++; } }

void reverse(char str[]) { int i = 0; while(str[i]) { if(islower(str[i])) str[i] = toupper(str[i]); else str[i] = tolower(str[i]); i++; } }

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!