1. What is the ASCII value of the character \'c\'? 2 .Explain what the tolower()
ID: 3652919 • Letter: 1
Question
1. What is the ASCII value of the character 'c'? 2 .Explain what the tolower() function does to a character. The answer should include the argument(s) that are passed to tolower() (if any) and what it returns. 3. Write a C++ statement that takes the digit character in the char variable ch and changes it to its integer representation and saves the result in the integer variable intVal. So if ch contains '4', then intVal should contain the value 4. Assume that ch and intVal have been properly declared. 4. What is a scalar? 5. Give an example of a non-scalar data type. 6. 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" * if ch is anything else, print "invalid" Assume that ch has been properly declared and contains a value. 7. Write a C++ statement that takes the digit character in the char variable ch and changes it to its integer representation and saves the result in the integer variable intVal. So if ch contains '4', then intVal should contain the value 4. Assume that ch and intVal have been properly declared. 8. What is the ASCII value of the character '1'?Explanation / Answer
// 6. switch(ch) { case 'a': coutRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.