Question: 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
Outputs for the given C code a Input is 5 cinnum User inputs 5 if num0 50 tr... View full answer
Get step-by-step solutions from verified subject matter experts
