Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
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