Question: please help Here is the driver.cpp #include #include #include using namespace std; //implement mySwap function here int main( ) { int x = 5, y

please help

Here is the driver.cpp

#include

#include

#include

using namespace std;

//implement mySwap function here

int main( ) {

int x = 5, y = 7;

double a = 2, b = 4;

string p = "abc", q = "xyz";

vector v(5, 5), w(7, 7);

cout <<"Before swap:"<

mySwap( x, y );

cout <<"After swap:"<

cout <<"Before swap:"<

mySwap( a, b );

cout <<"After swap:"<

cout <<"Before swap:"<

mySwap( p, q );

cout <<"After swap:"<

cout <<"Before swap v:"<

for ( int i = 0; i < v.size( ); i++ )

cout << v[i];

cout<

cout <<"Before swap w:"<

for ( int i = 0; i < w.size( ); i++ )

cout << w[i];

cout<

mySwap( v, w );

//cout <<"After swap:"<

cout <<"After swap v:"<

for ( int i = 0; i < v.size( ); i++ )

cout << v[i];

cout<

cout <<"After swap w:"<

for ( int i = 0; i < w.size( ); i++ )

cout << w[i];

cout << endl;

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!