Write a function that takes a reference to a string object as its parameter and that converts
Question:
Write a function that takes a reference to a string object as its parameter and that converts the contents of the string to uppercase. Use the toupper() function described in Table 6.4 of Chapter 6.Write a program that uses a loop which allows you to test the function with different input.A sample run might look like this:
Enter a string (q to quit): go away
GO AWAY
Next string (q to quit): good grief!
GOOD GRIEF!
Next string (q to quit): q
Bye.
Transcribed Image Text:
Table 6.4 The cctype Character Functions Function Name Return Value isxdigit () tolower() toupper() This function returns true if the argument is a hexadecimal digit character (that is, 0-9, a-f, or A-F). If the argument is an uppercase character, tolower() returns the lowercase version of that character; otherwise, it returns the argu- ment unaltered. If the argument is a lowercase character, toupper() returns the uppercase version of that character; otherwise, it returns the argu- ment unaltered.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 50% (12 reviews)
include include include using namespace std void converttouppercasestri...View the full answer
Answered By
Aketch Cindy Sunday
I am a certified tutor with over two years of experience tutoring . I have a passion for helping students learn and grow, and I firmly believe that every student has the potential to be successful. I have a wide range of experience working with students of all ages and abilities, and I am confident that I can help students succeed in school.
I have experience working with students who have a wide range of abilities. I have also worked with gifted and talented students, and I am familiar with a variety of enrichment and acceleration strategies.
I am a patient and supportive tutor who is dedicated to helping my students reach their full potential. Thank you for your time and consideration.
0.00
0 Reviews
10+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
When the vibrations of a string are damped, with a resistance which is proportionnal to the velocity. the one dimmensional wave equation becomes Pu t Ju t 01 where is the constant of proportionality...
-
Write a function that takes an input file stream object and a 2d array as parameters and reads all the characters in the input file stream, incrementing the count in the 2d array for each letter found
-
Your task: You are asked to write a function that applies Simulated Annealing to a Traveling Salesman Problem. That is, your function will run simulated annealing as discussed in class and report...
-
Adam and Mandeep are in a partnership in retailing computer accessories. The partnership records, exclusive of GST, for this income year, disclose: Receipts ($): 530,000 Payments ($): 175,000 70,000...
-
In 2010, the Dodd-Frank Act authorized the Federal Reserve, Financial Services Oversight Council, and Office of Credit Ratings to issue new financial regulations, including stronger capital...
-
A gas mixture at 350 K and 300 kPa has the following volumetric analysis: 65 percent N2, 20 percent O2, and 15 percent CO2. Determine the mass fraction and partial pressure of each gas.
-
When preparing departmental contribution statements of financial performance, all direct expenses are controllable by department managers. Discuss, giving examples.
-
Algonquin Carpets reported the following amounts in its 2013 financial statements. The 2012 figures are given for comparison. Requirements 1. Calculate Algonquins acid-test ratio for 2013. Determine...
-
Demographics of Toronto ontario Canada (brief description of the city i.e. location, population size of police force, any interesting factors that may contribute to youth crime etc.). What is the...
-
Sanyu Sony started a new business and completed these transactions during December. Dec. 1 Sanyu Sony transferred $65,000 cash from a personal savings account to a checking account in the name of...
-
The CandyBar structure contains three members. The first member holds the brand name of a candy bar. The second member holds the weight (which may have a fractional part) of the candy bar, and the...
-
Suppose the song() function has this prototype: void song(const char * name, int times); a. How would you modify the prototype so that the default value for times is 1? b. What changes would you make...
-
A. Suppose again that a price floor p greater than the equilibrium price p has been imposed and that the government has committed to purchase the difference between what is supplied at the price...
-
The Resposibilitee Company, which sells tee shirts, is planning to open a new manufacturing plant in South America. In order to uphold its commitment to being a socially responsible corporation, the...
-
What is Walmart's internal strengths and weaknesses. How can organizational relationships improve performance in Walmart?
-
Write a C program that asks the user to enter the sum and difference of 2 integer numbers. The program will find the 2 numbers and display them as shown below. Input validation: sum plus difference...
-
If $300,000 is to be saved over 15 years, how much should be deposited monthly if the investment earns 7% interest compounded monthly?
-
Medicare Advantage Plans market and sell their products to individual Medicare beneficiaries. Numerous commercials air on television concerning these programs. There are federal and state...
-
Schedule the final exams for Math 115, Math 116, Math 185, Math 195, CS 101, CS 102, CS 273, and CS 473, using the fewest number of different time slots, if there are no students taking both Math 115...
-
$10,000 was borrowed at 3.5% on July 17. The borrower repaid $5000 on August 12, and $2000 on September 18. What final payment is required on November 12 to fully repay the loan?
-
Draw contour diagrams to show the state of execution prior to the following line numbers of the CalcAreaCircle class in Fig. 2.35 in Sect. 2.11. A. Line 8 B. Line 12 (assume an input value of 2.0 )...
-
Indicate whether the following statements using the Circle class in Fig. 2.34 in Sect. 2.11 are syntactically correct or incorrect. If incorrect, indicate what is wrong with the statement: *A. Circle...
-
Rewrite the complete program in Sect. 1.10 using dialog boxes for input and output. Input ? Message Enter the number: 4.0 OK Cancel Two to the power of 4.0 is 16.0. OK X X
-
This project requires an investment in fixed assets, at time 0, of 44,000,000. Assets will be depreciated straight line in 5 years. This project has a 4 year life. The revenues for each of the 4...
-
Lorenzo Company applies overhead to jobs on the basis of direct materials cost. At year - end, the Work in Process Inventory account shows the following. Work in Process Inventory Date Explanation...
-
T-bill with a $10,000 par has 174 days until maturity. The T-bill has a bank discount bid quote of 2.208% and ask quote of 2.198%. What is the return on the investment in this T-bill if the trader...
Study smarter with the SolutionInn App