Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Suppose that num is an int variable. Consider the following C++ code: cin >> num; (num > 0) switch a. b. { case 0:

   

Suppose that num is an int variable. Consider the following C++ code: cin >> num; (num > 0) switch a. b. { case 0: else C. d. num=static_cast (pow (num, 3.0)); case 2: break; } (num) num++num; case 4: break; case 5: num- num break; case 6: num num. num- num / break; case 10: num--; break; default: num- num + 10; cout < < num < < endl; num--20; 41 67 What is the output if the input is 5? What is the output if the input is 26? What is the output if the input is 2? What is the output if the input is -5?

Step by Step Solution

3.59 Rating (160 Votes )

There are 3 Steps involved in it

Step: 1

Outputs for the given C code a Input is 5 cinnum User inputs 5 if num0 50 tr... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Computer organization and architecture designing for performance

Authors: william stallings

8th edition

136073735, 978-0136073734

More Books

Students also viewed these Programming questions