Question: 1. (2 points) The data type char and the data type are often interchageable in C++. a. double b. float c. int d. string 2.

 1. (2 points) The data type char and the data type

1. (2 points) The data type char and the data type are often interchageable in C++. a. double b. float c. int d. string 2. (2 points) What will happen if a char is cout' d as an int? a. the character will be displayed b. the ASCII value of the character will be displayed c. it will not compile d. it will produce a run-time error 3. (2 points) What is the ASCII value of the character ' 1 '? 4. (2 points) What is the ASCII value of the character ' c '? 5. (2 points) Write a cout statement to display the ASCII value of the character stored in a char variable called ch. Assume that ch has been properly declared and contains a value. 6. (2 points) Explain what tolower() does to a character. The answer should include the argument(s) that are passed to tolower0 (if any) and what it returns. should contain the value 4. Assume that ch and int Val have been properly declared. 8. (2 points) Write a switch statement to print out a string depending on the value of a char variable called ch. If - ch is 'a print "excellent" - ch is 'b' print "good" - ch is 'c" print "ok" 0 if ch is anything else, print "invalid

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!