
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
19

Transcribed Image Text:What is the output of the following segment of code if the value 4 is input by the
user?
int num;
int total = 0;
cout << "Enter a number from 1 to 10: ";
cin >> num;
switch (num)
{
case 1:
case 2: total = 5;
case 3: total = 10;
case 4: total= total + 3;
case 8: total =
total + 6;
default: total = total + 4;
}
cout << total << endl;
OA) 23
B) O
OC) 13
OD) 3
E) None of these
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 1 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Please refer to this textbook: “A. Silberschatz, P. B. Galvin and G. Gagne, “Operating System Principles,”7th Edition, John Wiley & Sons Inc., 2006.” And answer the following questions: Question: Which mutual exclusion algorithm requires, on average, the fewest messages in a group of 100 machines? centralized. Token-ring. Lamport' s . Ricart & Agrawalaarrow_forward5:10 A) H₂O(l) B) H₂O(g) Choose the compound with the largest standard molar entropy, Sº (298.15 K). C) C(diamond) Question 1 of 15 D) CH3OH (1) .5G Tap here or pull up for additional resources Submitarrow_forwardFind the regular expression corresponding to Fig. 5.17. 1 91 92 1 1 94 93 Fig. 5.17 Finite automatonarrow_forward
- When an interrupt occurs, the CPU suspends the current process and handles the problem. In technical terms, this is known as interrupt service. What is the cause for the current process's halt? Consider completing the task now and dealing with the interruption afterwards.arrow_forwardsample input file : Emergency|32456|Mohammed Al Azri|12-11-2021 09:30|Dr. Muna Mousa|fever, cough Routine|12345|Ali Al Abri|22-11-2021 10:30|Dr. Ahmed Al Abri|blood, x-ray Routine|32456|Mohammed Al Azri|02-12-2021 08:45|Dr. Hisham Nazim|x-ray Emergency|12345|Ali Al Abri|12-11-2021 08:15|Dr. Ahmed Al Abri|fever, cold, cough Routine|43234|Mariam Ali|24-11-2021 09:15|Dr. Muna Mousa|blood, urine Emergency|44342|Issa Ismail|13-11-2021 13:15|Dr. Muna Mousa|feverarrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education