Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

1. Who should participate and how will participants be recruited?

Answered: 1 week ago

Question

3. How would this philosophy fit in your organization?

Answered: 1 week ago

Question

How would you assess the value of an approach like this?

Answered: 1 week ago