Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#include iostream > using namespace std; int : main ( ) char character = ' # ' ; string name = Peter; character - =

#include iostream>
using namespace std;
int
: main()
char character ='#';
string name = "Peter";
character -=7;
switch (character %5)
case 1:
name = "Martha";
break;
case 2:
name = "Anne";
break;
case 3:
name = "Carl";
break;
case 4:
name = "Vannesa";
break;
default: cout "Will" endl;
break;
return 0;
cout << "The selected name is " name<< endl; what would be the result in the following lines:
line 8, selection =
line 9, switch (selection %23=)
line 27, the prompting message is =

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions