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
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; } There are 3 Steps involved in it Get step-by-step solutions from verified subject matter expertsStep by Step Solution
