1. Write a cout statement to display the ASCII value of the character stored in
ID: 3652942 • Letter: 1
Question
1. 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. 2. What is the ASCII value of the character '1'? 3. What is the ASCII value of the character 'c'? 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.Explanation / Answer
answer-1. void main() { int intVal; char ch; coutch; intVal=ch; coutRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.