SlideShare une entreprise Scribd logo
1  sur  1
JOJI ILAGAN CAREER CENTER F OUNDATION , INC .
                                                COLLEGE OF BUSINESS AND TOURISM
                                                         Gov. Chavez St., Davao City

Com Ed 6 – Programming with C++
MIDTERM EXAMINATION                                                                                                   JEFF REY A. COMIDOY
2nd Sem SY 2012-2013                                                                                                    Com Ed Instructor
75 Points

     I.        Choose the letter of the correct answer.
1.   When a C++ program must choose whether to take a particular action, you usually implement the choice with an IF statement.
     a. Single Selection                 b. Double Selection            c. Repetition Structure                d. None of these
2.   Let a program decide which of two statements or blocks are executed.
     a. Single Selection               b. Double Selection              c. Repetition Structure                         d. None of these
3.   allows the programmer to specify that an action is to be repeated while some condition remains true.
     a. Single Selection               b. Double Selection                 c. Repetition Structure                      d. None of these
4.   C++ that provides three types of selection structures, which one of the following:
     a. Single Selection                b. Double Selection                 c. Repetition Structure                     d. None of these
5.   A “special” character that sounds the system bell or an alert.
     a. n                               b. t                                c. r                                     d. a
6.   A “special” character that position the screen cursor to the beginning of the current line; do not advance to the next line.
     a. n                                b. t                             c. r                                     d. a
7.   A “special” character that move the screen cursor to the next tab stop.
     a. n                              b. t                                c. r                                      d. a
8.   A “special” character that position the screen cursor to the beginning of the next line; it advances to the next line.
     a. n                                b. t                             c. r                                       d. a
9.   Data type that can be stored as integer number.
     a. int                              b. char                              c. double                                 d. variable
10. Data type that can be stored as character.
    a. int                            b. char                                 c. double                                 d. variable
11. Data type that can be stored as floating point number
    a. int                              b. char                               c. double                                 d. variable
12. Location in memory where a value can be stored for use by a program.
    a. int                          b. char                            c. double                                        d. variable
13. A program that initializes the tested variable before testing the condition.
    a. If Loop                           b. Do While Loop                     c. While Loop                             d. For Loop
14. A program evaluates the test condition expression. If it is true, the program executes the statement( s) in the body.
    a. If Loop                        b. Do While Loop                       c. While Loop                           d. For Loop
15. A program execute first the statement( s) in the body before evaluating the test condition expression.
    a. If Loop                         b. Do While Loop                    c. While Loop                                d. For Loop


     II.      Write the code of the following problem using For loop (2 pts), While loop (2 pts), Do While loop (2 pts)
1.   Ask the user 10 numbers and add all the 10 numbers. Output the total.
2.   Ask the user 5 cocktail mixes using loops. Output one name in every line.
3.   Ask the user a number from 1 to 10 and output “Correct” if it is equals to 5.
4.   Ask the user to input 5 numbers and multiply every number to itself. Output the five results.
5.   Output “Please Press A” on the monitor and exits the program when the user presses A.

     III.       (30 pts) Write an algorithm (10 pts), flowchart (10 pts) and C++ code (10 pts).

            Ask the user two numbers and add the numbers. Show the total.

Contenu connexe

En vedette

Infografico: Publicidade e Responsive Design pela Smart AdServer
Infografico: Publicidade e Responsive Design pela Smart AdServerInfografico: Publicidade e Responsive Design pela Smart AdServer
Infografico: Publicidade e Responsive Design pela Smart AdServerSmart AdServer
 
Dysphagia Lusoria Caused by Kommerell’s Diverticulum of the Aberrant Left Sub...
Dysphagia Lusoria Caused by Kommerell’s Diverticulum of the Aberrant Left Sub...Dysphagia Lusoria Caused by Kommerell’s Diverticulum of the Aberrant Left Sub...
Dysphagia Lusoria Caused by Kommerell’s Diverticulum of the Aberrant Left Sub...Waleed Mahrous
 
Mind map installation
Mind map installationMind map installation
Mind map installationrifatrahmannn
 
Koadroa
Koadroa Koadroa
Koadroa eider06
 
Student risk assessment
Student risk assessment Student risk assessment
Student risk assessment niamhayes
 
Ficha 3 excel beatriz, nº24, maria lopes, nº14, 8ºb
Ficha 3 excel   beatriz, nº24, maria lopes, nº14, 8ºbFicha 3 excel   beatriz, nº24, maria lopes, nº14, 8ºb
Ficha 3 excel beatriz, nº24, maria lopes, nº14, 8ºbpagillo
 

En vedette (11)

Infografico: Publicidade e Responsive Design pela Smart AdServer
Infografico: Publicidade e Responsive Design pela Smart AdServerInfografico: Publicidade e Responsive Design pela Smart AdServer
Infografico: Publicidade e Responsive Design pela Smart AdServer
 
Cientificos 1
Cientificos 1Cientificos 1
Cientificos 1
 
Masoterapeuta power
Masoterapeuta powerMasoterapeuta power
Masoterapeuta power
 
Dysphagia Lusoria Caused by Kommerell’s Diverticulum of the Aberrant Left Sub...
Dysphagia Lusoria Caused by Kommerell’s Diverticulum of the Aberrant Left Sub...Dysphagia Lusoria Caused by Kommerell’s Diverticulum of the Aberrant Left Sub...
Dysphagia Lusoria Caused by Kommerell’s Diverticulum of the Aberrant Left Sub...
 
Mind map installation
Mind map installationMind map installation
Mind map installation
 
Koadroa
Koadroa Koadroa
Koadroa
 
Inicjatywa uchwałodawcza mieszkańców
Inicjatywa uchwałodawcza mieszkańcówInicjatywa uchwałodawcza mieszkańców
Inicjatywa uchwałodawcza mieszkańców
 
Student risk assessment
Student risk assessment Student risk assessment
Student risk assessment
 
Épocas de la colonia
Épocas de la colonia Épocas de la colonia
Épocas de la colonia
 
Reference
ReferenceReference
Reference
 
Ficha 3 excel beatriz, nº24, maria lopes, nº14, 8ºb
Ficha 3 excel   beatriz, nº24, maria lopes, nº14, 8ºbFicha 3 excel   beatriz, nº24, maria lopes, nº14, 8ºb
Ficha 3 excel beatriz, nº24, maria lopes, nº14, 8ºb
 

Similaire à 00 Com Ed 6 Midterm

Joji ilagan career center foundation6final
Joji ilagan career center foundation6finalJoji ilagan career center foundation6final
Joji ilagan career center foundation6finalbluejayjunior
 
Clad sample exam15
Clad sample exam15Clad sample exam15
Clad sample exam15Walid Amri
 
Chapter 1 Introduction to Computers- Programs- and Java 1- A Java prog.pdf
Chapter 1 Introduction to Computers- Programs- and Java 1- A Java prog.pdfChapter 1 Introduction to Computers- Programs- and Java 1- A Java prog.pdf
Chapter 1 Introduction to Computers- Programs- and Java 1- A Java prog.pdfakknit
 
Progress test
Progress testProgress test
Progress testvhtpro
 
Executable Specifications in Action
Executable Specifications in ActionExecutable Specifications in Action
Executable Specifications in ActionVagif Abilov
 
Executable Specifications in Action
Executable Specifications in ActionExecutable Specifications in Action
Executable Specifications in ActionVagif Abilov
 
Assignment 1 for 2nd sem
Assignment 1 for 2nd semAssignment 1 for 2nd sem
Assignment 1 for 2nd semhome
 
C and CPP Interview Questions
C and CPP Interview QuestionsC and CPP Interview Questions
C and CPP Interview QuestionsSagar Joshi
 
21: Which method determines if a JRadioButton is selected?
21: Which method determines if a JRadioButton is selected?21: Which method determines if a JRadioButton is selected?
21: Which method determines if a JRadioButton is selected?sukeshsuresh189
 
Comp 328 final guide (devry)
Comp 328 final guide (devry)Comp 328 final guide (devry)
Comp 328 final guide (devry)sukeshsuresh189
 
6: Which of the following statements about creating arrays and initializing t...
6: Which of the following statements about creating arrays and initializing t...6: Which of the following statements about creating arrays and initializing t...
6: Which of the following statements about creating arrays and initializing t...sukeshsuresh189
 
202: When the user clicks a JCheckBox, a(n) occurs.
202: When the user clicks a JCheckBox, a(n) occurs.202: When the user clicks a JCheckBox, a(n) occurs.
202: When the user clicks a JCheckBox, a(n) occurs.sukeshsuresh189
 
3: A(n) ________ enables a program to read data from the user.
3: A(n) ________ enables a program to read data from the user.3: A(n) ________ enables a program to read data from the user.
3: A(n) ________ enables a program to read data from the user.sukeshsuresh189
 

Similaire à 00 Com Ed 6 Midterm (20)

Com Ed 6 Prelim
Com Ed 6 PrelimCom Ed 6 Prelim
Com Ed 6 Prelim
 
Joji ilagan career center foundation6final
Joji ilagan career center foundation6finalJoji ilagan career center foundation6final
Joji ilagan career center foundation6final
 
Com Ed 6 Prelim
Com Ed 6 PrelimCom Ed 6 Prelim
Com Ed 6 Prelim
 
C sharp chap1
C sharp chap1C sharp chap1
C sharp chap1
 
Java Programming.pdf
Java Programming.pdfJava Programming.pdf
Java Programming.pdf
 
Clad sample exam15
Clad sample exam15Clad sample exam15
Clad sample exam15
 
Chapter 1 Introduction to Computers- Programs- and Java 1- A Java prog.pdf
Chapter 1 Introduction to Computers- Programs- and Java 1- A Java prog.pdfChapter 1 Introduction to Computers- Programs- and Java 1- A Java prog.pdf
Chapter 1 Introduction to Computers- Programs- and Java 1- A Java prog.pdf
 
Programming Practice Questions_C
Programming Practice Questions_CProgramming Practice Questions_C
Programming Practice Questions_C
 
Progress test
Progress testProgress test
Progress test
 
Lecture19.07.2014
Lecture19.07.2014Lecture19.07.2014
Lecture19.07.2014
 
Executable Specifications in Action
Executable Specifications in ActionExecutable Specifications in Action
Executable Specifications in Action
 
Executable Specifications in Action
Executable Specifications in ActionExecutable Specifications in Action
Executable Specifications in Action
 
C programming Basics
C programming BasicsC programming Basics
C programming Basics
 
Assignment 1 for 2nd sem
Assignment 1 for 2nd semAssignment 1 for 2nd sem
Assignment 1 for 2nd sem
 
C and CPP Interview Questions
C and CPP Interview QuestionsC and CPP Interview Questions
C and CPP Interview Questions
 
21: Which method determines if a JRadioButton is selected?
21: Which method determines if a JRadioButton is selected?21: Which method determines if a JRadioButton is selected?
21: Which method determines if a JRadioButton is selected?
 
Comp 328 final guide (devry)
Comp 328 final guide (devry)Comp 328 final guide (devry)
Comp 328 final guide (devry)
 
6: Which of the following statements about creating arrays and initializing t...
6: Which of the following statements about creating arrays and initializing t...6: Which of the following statements about creating arrays and initializing t...
6: Which of the following statements about creating arrays and initializing t...
 
202: When the user clicks a JCheckBox, a(n) occurs.
202: When the user clicks a JCheckBox, a(n) occurs.202: When the user clicks a JCheckBox, a(n) occurs.
202: When the user clicks a JCheckBox, a(n) occurs.
 
3: A(n) ________ enables a program to read data from the user.
3: A(n) ________ enables a program to read data from the user.3: A(n) ________ enables a program to read data from the user.
3: A(n) ________ enables a program to read data from the user.
 

Plus de bluejayjunior

Com ed 2 prelim exam
Com ed 2 prelim examCom ed 2 prelim exam
Com ed 2 prelim exambluejayjunior
 
Intr to-html-xhtml-1233508169541646-3
Intr to-html-xhtml-1233508169541646-3Intr to-html-xhtml-1233508169541646-3
Intr to-html-xhtml-1233508169541646-3bluejayjunior
 
Com ed 4 prelim exam
Com ed 4 prelim examCom ed 4 prelim exam
Com ed 4 prelim exambluejayjunior
 
Chapter1.0 database management system
Chapter1.0 database management systemChapter1.0 database management system
Chapter1.0 database management systembluejayjunior
 
01 Database Management (re-uploaded)
01 Database Management (re-uploaded)01 Database Management (re-uploaded)
01 Database Management (re-uploaded)bluejayjunior
 
03 using the internet (re-uploaded)
03 using the internet (re-uploaded)03 using the internet (re-uploaded)
03 using the internet (re-uploaded)bluejayjunior
 
03 using the internet b (re-upload)
03 using the internet b (re-upload)03 using the internet b (re-upload)
03 using the internet b (re-upload)bluejayjunior
 
02 internet history and growth (re-upload)
02 internet history and growth (re-upload)02 internet history and growth (re-upload)
02 internet history and growth (re-upload)bluejayjunior
 
01 intro to internet (re-upload)
01 intro to internet (re-upload)01 intro to internet (re-upload)
01 intro to internet (re-upload)bluejayjunior
 
Chapter 02 Computer Languages (re-upload)
Chapter 02 Computer Languages (re-upload)Chapter 02 Computer Languages (re-upload)
Chapter 02 Computer Languages (re-upload)bluejayjunior
 
Chapter 01 Planning Computer Program (re-upload)
Chapter 01 Planning Computer Program (re-upload)Chapter 01 Planning Computer Program (re-upload)
Chapter 01 Planning Computer Program (re-upload)bluejayjunior
 
C++ control structure
C++ control structureC++ control structure
C++ control structurebluejayjunior
 
reference for finals
reference for finalsreference for finals
reference for finalsbluejayjunior
 
Joji ilagan career center foundation8mid
Joji ilagan career center foundation8midJoji ilagan career center foundation8mid
Joji ilagan career center foundation8midbluejayjunior
 
Joji ilagan career center foundation8pre2
Joji ilagan career center foundation8pre2Joji ilagan career center foundation8pre2
Joji ilagan career center foundation8pre2bluejayjunior
 

Plus de bluejayjunior (20)

Com ed 2 prelim exam
Com ed 2 prelim examCom ed 2 prelim exam
Com ed 2 prelim exam
 
Introhtml 2
Introhtml 2Introhtml 2
Introhtml 2
 
Intr to-html-xhtml-1233508169541646-3
Intr to-html-xhtml-1233508169541646-3Intr to-html-xhtml-1233508169541646-3
Intr to-html-xhtml-1233508169541646-3
 
Com ed 4 prelim exam
Com ed 4 prelim examCom ed 4 prelim exam
Com ed 4 prelim exam
 
Chapter1.0 database management system
Chapter1.0 database management systemChapter1.0 database management system
Chapter1.0 database management system
 
01 Database Management (re-uploaded)
01 Database Management (re-uploaded)01 Database Management (re-uploaded)
01 Database Management (re-uploaded)
 
03 using the internet (re-uploaded)
03 using the internet (re-uploaded)03 using the internet (re-uploaded)
03 using the internet (re-uploaded)
 
03 using the internet b (re-upload)
03 using the internet b (re-upload)03 using the internet b (re-upload)
03 using the internet b (re-upload)
 
02 internet history and growth (re-upload)
02 internet history and growth (re-upload)02 internet history and growth (re-upload)
02 internet history and growth (re-upload)
 
01 intro to internet (re-upload)
01 intro to internet (re-upload)01 intro to internet (re-upload)
01 intro to internet (re-upload)
 
Chapter 02 Computer Languages (re-upload)
Chapter 02 Computer Languages (re-upload)Chapter 02 Computer Languages (re-upload)
Chapter 02 Computer Languages (re-upload)
 
Chapter 01 Planning Computer Program (re-upload)
Chapter 01 Planning Computer Program (re-upload)Chapter 01 Planning Computer Program (re-upload)
Chapter 01 Planning Computer Program (re-upload)
 
C++ control structure
C++ control structureC++ control structure
C++ control structure
 
internet security 2
internet security 2internet security 2
internet security 2
 
reference for finals
reference for finalsreference for finals
reference for finals
 
Internet Secutiry
Internet SecutiryInternet Secutiry
Internet Secutiry
 
Com Ed 8 Finals
Com Ed 8 FinalsCom Ed 8 Finals
Com Ed 8 Finals
 
Joji ilagan career center foundation8mid
Joji ilagan career center foundation8midJoji ilagan career center foundation8mid
Joji ilagan career center foundation8mid
 
Joji ilagan career center foundation8pre2
Joji ilagan career center foundation8pre2Joji ilagan career center foundation8pre2
Joji ilagan career center foundation8pre2
 
Com Ed 8 Prelim
Com Ed 8 PrelimCom Ed 8 Prelim
Com Ed 8 Prelim
 

Dernier

Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...KokoStevan
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 

Dernier (20)

Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 

00 Com Ed 6 Midterm

  • 1. JOJI ILAGAN CAREER CENTER F OUNDATION , INC . COLLEGE OF BUSINESS AND TOURISM Gov. Chavez St., Davao City Com Ed 6 – Programming with C++ MIDTERM EXAMINATION JEFF REY A. COMIDOY 2nd Sem SY 2012-2013 Com Ed Instructor 75 Points I. Choose the letter of the correct answer. 1. When a C++ program must choose whether to take a particular action, you usually implement the choice with an IF statement. a. Single Selection b. Double Selection c. Repetition Structure d. None of these 2. Let a program decide which of two statements or blocks are executed. a. Single Selection b. Double Selection c. Repetition Structure d. None of these 3. allows the programmer to specify that an action is to be repeated while some condition remains true. a. Single Selection b. Double Selection c. Repetition Structure d. None of these 4. C++ that provides three types of selection structures, which one of the following: a. Single Selection b. Double Selection c. Repetition Structure d. None of these 5. A “special” character that sounds the system bell or an alert. a. n b. t c. r d. a 6. A “special” character that position the screen cursor to the beginning of the current line; do not advance to the next line. a. n b. t c. r d. a 7. A “special” character that move the screen cursor to the next tab stop. a. n b. t c. r d. a 8. A “special” character that position the screen cursor to the beginning of the next line; it advances to the next line. a. n b. t c. r d. a 9. Data type that can be stored as integer number. a. int b. char c. double d. variable 10. Data type that can be stored as character. a. int b. char c. double d. variable 11. Data type that can be stored as floating point number a. int b. char c. double d. variable 12. Location in memory where a value can be stored for use by a program. a. int b. char c. double d. variable 13. A program that initializes the tested variable before testing the condition. a. If Loop b. Do While Loop c. While Loop d. For Loop 14. A program evaluates the test condition expression. If it is true, the program executes the statement( s) in the body. a. If Loop b. Do While Loop c. While Loop d. For Loop 15. A program execute first the statement( s) in the body before evaluating the test condition expression. a. If Loop b. Do While Loop c. While Loop d. For Loop II. Write the code of the following problem using For loop (2 pts), While loop (2 pts), Do While loop (2 pts) 1. Ask the user 10 numbers and add all the 10 numbers. Output the total. 2. Ask the user 5 cocktail mixes using loops. Output one name in every line. 3. Ask the user a number from 1 to 10 and output “Correct” if it is equals to 5. 4. Ask the user to input 5 numbers and multiply every number to itself. Output the five results. 5. Output “Please Press A” on the monitor and exits the program when the user presses A. III. (30 pts) Write an algorithm (10 pts), flowchart (10 pts) and C++ code (10 pts). Ask the user two numbers and add the numbers. Show the total.