SlideShare a Scribd company logo
1 of 1
Download to read offline
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"

More Related Content

Similar to 1- (2 points) The data type char and the data type are often interchag.pdf

Chapter 4 Mathematical Functions, Characters, and Strings.pptx
Chapter 4 Mathematical Functions, Characters, and Strings.pptxChapter 4 Mathematical Functions, Characters, and Strings.pptx
Chapter 4 Mathematical Functions, Characters, and Strings.pptx
ssusere3b1a2
 
Using the Ceasar Cipher encryption algorithm, you take each characte.pdf
Using the Ceasar Cipher encryption algorithm, you take each characte.pdfUsing the Ceasar Cipher encryption algorithm, you take each characte.pdf
Using the Ceasar Cipher encryption algorithm, you take each characte.pdf
amirthagiftsmadurai
 

Similar to 1- (2 points) The data type char and the data type are often interchag.pdf (20)

Cse115 lecture14strings part01
Cse115 lecture14strings part01Cse115 lecture14strings part01
Cse115 lecture14strings part01
 
Chapter 4 (Part II) - Array and Strings.pdf
Chapter 4 (Part II) - Array and Strings.pdfChapter 4 (Part II) - Array and Strings.pdf
Chapter 4 (Part II) - Array and Strings.pdf
 
2nd Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...
2nd  Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...2nd  Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...
2nd Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...
 
Cpprm
CpprmCpprm
Cpprm
 
Java Object Orientend Programming 1.pptx
Java Object Orientend Programming 1.pptxJava Object Orientend Programming 1.pptx
Java Object Orientend Programming 1.pptx
 
COM1407: Type Casting, Command Line Arguments and Defining Constants
COM1407: Type Casting, Command Line Arguments and Defining Constants COM1407: Type Casting, Command Line Arguments and Defining Constants
COM1407: Type Casting, Command Line Arguments and Defining Constants
 
C++ Programming Homework Help
C++ Programming Homework HelpC++ Programming Homework Help
C++ Programming Homework Help
 
Lesson in Strings for C Programming Lessons
Lesson in Strings for C Programming LessonsLesson in Strings for C Programming Lessons
Lesson in Strings for C Programming Lessons
 
Strings IN C
Strings IN CStrings IN C
Strings IN C
 
Chapter 4 Mathematical Functions, Characters, and Strings.pptx
Chapter 4 Mathematical Functions, Characters, and Strings.pptxChapter 4 Mathematical Functions, Characters, and Strings.pptx
Chapter 4 Mathematical Functions, Characters, and Strings.pptx
 
object oriented programming in java lecture
object oriented programming in java lectureobject oriented programming in java lecture
object oriented programming in java lecture
 
C string
C stringC string
C string
 
Bringing nullability into existing code - dammit is not the answer.pptx
Bringing nullability into existing code - dammit is not the answer.pptxBringing nullability into existing code - dammit is not the answer.pptx
Bringing nullability into existing code - dammit is not the answer.pptx
 
Nn
NnNn
Nn
 
Acm aleppo cpc training second session
Acm aleppo cpc training second sessionAcm aleppo cpc training second session
Acm aleppo cpc training second session
 
GRADE 11 Chapter 5 - Python Fundamentals.pptx
GRADE 11 Chapter 5 - Python Fundamentals.pptxGRADE 11 Chapter 5 - Python Fundamentals.pptx
GRADE 11 Chapter 5 - Python Fundamentals.pptx
 
Revision1 C programming
Revision1 C programmingRevision1 C programming
Revision1 C programming
 
python-ch2.pptx
python-ch2.pptxpython-ch2.pptx
python-ch2.pptx
 
Using the Ceasar Cipher encryption algorithm, you take each characte.pdf
Using the Ceasar Cipher encryption algorithm, you take each characte.pdfUsing the Ceasar Cipher encryption algorithm, you take each characte.pdf
Using the Ceasar Cipher encryption algorithm, you take each characte.pdf
 
C cheat sheet for varsity (extreme edition)
C cheat sheet for varsity (extreme edition)C cheat sheet for varsity (extreme edition)
C cheat sheet for varsity (extreme edition)
 

More from 101lightings

1- An SA has no access to sensitive information by default- True False.pdf
1- An SA has no access to sensitive information by default- True False.pdf1- An SA has no access to sensitive information by default- True False.pdf
1- An SA has no access to sensitive information by default- True False.pdf
101lightings
 
1- Albert Gaytor and his wife Allison are married and file a joint ret.pdf
1- Albert Gaytor and his wife Allison are married and file a joint ret.pdf1- Albert Gaytor and his wife Allison are married and file a joint ret.pdf
1- Albert Gaytor and his wife Allison are married and file a joint ret.pdf
101lightings
 
1- --Sea otters are native to the western cosst of North America- Betw.pdf
1- --Sea otters are native to the western cosst of North America- Betw.pdf1- --Sea otters are native to the western cosst of North America- Betw.pdf
1- --Sea otters are native to the western cosst of North America- Betw.pdf
101lightings
 
1- Select TWO of the three most densely populated major regions of t (1).pdf
1-   Select TWO of the three most densely populated major regions of t (1).pdf1-   Select TWO of the three most densely populated major regions of t (1).pdf
1- Select TWO of the three most densely populated major regions of t (1).pdf
101lightings
 
1) Which of the following violates the Foreign Corrupt Practices Act (.pdf
1) Which of the following violates the Foreign Corrupt Practices Act (.pdf1) Which of the following violates the Foreign Corrupt Practices Act (.pdf
1) Which of the following violates the Foreign Corrupt Practices Act (.pdf
101lightings
 

More from 101lightings (20)

1- An SA has no access to sensitive information by default- True False.pdf
1- An SA has no access to sensitive information by default- True False.pdf1- An SA has no access to sensitive information by default- True False.pdf
1- An SA has no access to sensitive information by default- True False.pdf
 
1- An example of an axial bone is the a- Scapula b- Ilium c- Femur d-.pdf
1- An example of an axial bone is the a- Scapula b- Ilium c- Femur d-.pdf1- An example of an axial bone is the a- Scapula b- Ilium c- Femur d-.pdf
1- An example of an axial bone is the a- Scapula b- Ilium c- Femur d-.pdf
 
1- Albert Gaytor and his wife Allison are married and file a joint ret.pdf
1- Albert Gaytor and his wife Allison are married and file a joint ret.pdf1- Albert Gaytor and his wife Allison are married and file a joint ret.pdf
1- Albert Gaytor and his wife Allison are married and file a joint ret.pdf
 
1- A static budget is one developed for a single level of activity2- T.pdf
1- A static budget is one developed for a single level of activity2- T.pdf1- A static budget is one developed for a single level of activity2- T.pdf
1- A static budget is one developed for a single level of activity2- T.pdf
 
1- A user working remotely has a secure VPN access to an Operating Sys.pdf
1- A user working remotely has a secure VPN access to an Operating Sys.pdf1- A user working remotely has a secure VPN access to an Operating Sys.pdf
1- A user working remotely has a secure VPN access to an Operating Sys.pdf
 
1- A patient exhibits abnormally low levels of circulating IgE antibod.pdf
1- A patient exhibits abnormally low levels of circulating IgE antibod.pdf1- A patient exhibits abnormally low levels of circulating IgE antibod.pdf
1- A patient exhibits abnormally low levels of circulating IgE antibod.pdf
 
1) What is Linkage disequilibrium as applied to HLA antigens- 2) What.pdf
1) What is Linkage disequilibrium as applied to HLA antigens- 2) What.pdf1) What is Linkage disequilibrium as applied to HLA antigens- 2) What.pdf
1) What is Linkage disequilibrium as applied to HLA antigens- 2) What.pdf
 
1- --Sea otters are native to the western cosst of North America- Betw.pdf
1- --Sea otters are native to the western cosst of North America- Betw.pdf1- --Sea otters are native to the western cosst of North America- Betw.pdf
1- --Sea otters are native to the western cosst of North America- Betw.pdf
 
1- (6nts) Calculate the NIPA measures in AC from the alphabetized Nati.pdf
1- (6nts) Calculate the NIPA measures in AC from the alphabetized Nati.pdf1- (6nts) Calculate the NIPA measures in AC from the alphabetized Nati.pdf
1- (6nts) Calculate the NIPA measures in AC from the alphabetized Nati.pdf
 
1- List and describe briefly the Constitutional amendments included i.pdf
1-  List and describe briefly the Constitutional amendments included i.pdf1-  List and describe briefly the Constitutional amendments included i.pdf
1- List and describe briefly the Constitutional amendments included i.pdf
 
1- Distinguish between diversity and inclusion- 2- Using Google as a.pdf
1-  Distinguish between diversity and inclusion- 2-  Using Google as a.pdf1-  Distinguish between diversity and inclusion- 2-  Using Google as a.pdf
1- Distinguish between diversity and inclusion- 2- Using Google as a.pdf
 
1- Select TWO of the three most densely populated major regions of t (1).pdf
1-   Select TWO of the three most densely populated major regions of t (1).pdf1-   Select TWO of the three most densely populated major regions of t (1).pdf
1- Select TWO of the three most densely populated major regions of t (1).pdf
 
1)is the external conditions- including natural surroundings- people-.pdf
1)is the external conditions- including natural surroundings- people-.pdf1)is the external conditions- including natural surroundings- people-.pdf
1)is the external conditions- including natural surroundings- people-.pdf
 
1)Certain amino acids are essential nutrients for some microorganisms.pdf
1)Certain amino acids are essential nutrients for some microorganisms.pdf1)Certain amino acids are essential nutrients for some microorganisms.pdf
1)Certain amino acids are essential nutrients for some microorganisms.pdf
 
1+2+3++n-(n+12).pdf
1+2+3++n-(n+12).pdf1+2+3++n-(n+12).pdf
1+2+3++n-(n+12).pdf
 
1) What are the advantages and disadvantages of using HPC therapy-2) C.pdf
1) What are the advantages and disadvantages of using HPC therapy-2) C.pdf1) What are the advantages and disadvantages of using HPC therapy-2) C.pdf
1) What are the advantages and disadvantages of using HPC therapy-2) C.pdf
 
1- Olivia and Jake walk into CVS looking for chips and candy-.pdf
1-          Olivia and Jake walk into CVS looking for chips and candy-.pdf1-          Olivia and Jake walk into CVS looking for chips and candy-.pdf
1- Olivia and Jake walk into CVS looking for chips and candy-.pdf
 
1) Discuss why the phenotype-driven developmental genetics utilizing s.pdf
1) Discuss why the phenotype-driven developmental genetics utilizing s.pdf1) Discuss why the phenotype-driven developmental genetics utilizing s.pdf
1) Discuss why the phenotype-driven developmental genetics utilizing s.pdf
 
1) Which of the following violates the Foreign Corrupt Practices Act (.pdf
1) Which of the following violates the Foreign Corrupt Practices Act (.pdf1) Which of the following violates the Foreign Corrupt Practices Act (.pdf
1) Which of the following violates the Foreign Corrupt Practices Act (.pdf
 
1) What are some of the historical figures- technologies- and standard.pdf
1) What are some of the historical figures- technologies- and standard.pdf1) What are some of the historical figures- technologies- and standard.pdf
1) What are some of the historical figures- technologies- and standard.pdf
 

Recently uploaded

會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
中 央社
 

Recently uploaded (20)

Dementia (Alzheimer & vasular dementia).
Dementia (Alzheimer & vasular dementia).Dementia (Alzheimer & vasular dementia).
Dementia (Alzheimer & vasular dementia).
 
....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdf....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdf
 
Morse OER Some Benefits and Challenges.pptx
Morse OER Some Benefits and Challenges.pptxMorse OER Some Benefits and Challenges.pptx
Morse OER Some Benefits and Challenges.pptx
 
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & EngineeringBasic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
 
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdfTelling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
 
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfINU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
 
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
 
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptBasic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
 
The Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational ResourcesThe Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational Resources
 
Features of Video Calls in the Discuss Module in Odoo 17
Features of Video Calls in the Discuss Module in Odoo 17Features of Video Calls in the Discuss Module in Odoo 17
Features of Video Calls in the Discuss Module in Odoo 17
 
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
An Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptxAn Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptx
 
Word Stress rules esl .pptx
Word Stress rules esl               .pptxWord Stress rules esl               .pptx
Word Stress rules esl .pptx
 
[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation
 
How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17
 
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
Operations Management - Book1.p  - Dr. Abdulfatah A. SalemOperations Management - Book1.p  - Dr. Abdulfatah A. Salem
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
 
B.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdfB.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdf
 
Championnat de France de Tennis de table/
Championnat de France de Tennis de table/Championnat de France de Tennis de table/
Championnat de France de Tennis de table/
 

1- (2 points) The data type char and the data type are often interchag.pdf

  • 1. 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"