Question: The conversion macro toupper() returns an uppercase version of a lowercase character. If the argument is not a lowercase character, the original character is returned

 The conversion macro toupper() returns an uppercase version of a lowercase

The conversion macro toupper() returns an uppercase version of a lowercase character. If the argument is not a lowercase character, the original character is returned unchanged. Write your own version of toupper() without using the header file. Hint: The lowercase characters are all contiguous. Similarly, the uppercase characters are contiguous. The two ranges, however, are not contiguous. ....1 uppercase 1... lowercase If you can figure out the distance between a lowercase 'a' and an uppercase 'A', then you can create the converted result. Complete the following file: main.cpp /** 1 2 Returns the uppercase version of any lowercase character. @param c the character to modify @return the uppercase version of c if c is lowercase. If not, then c. 4 5 6 8 9 10 11 // Write your function here char toupper(char ch) { return ch; } Submit Calling with Arguments Name Arguments Actual Expected fail toupper fail toupper 'c c fail toupper x 3 3 pass toupper 3 pass toupper O Q Q Score 215

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!