SWAPING OF TWO NUMBERS IN CPP PROGRAM

  

#include <iostream>


using namespace std;


int main()

{

    string a= "lakshman";

    string b = "malviya";

    string c;

    c=a;

    a=b;

    b=c;

    cout<<"swaping strings :"<<endl;

    cout<<"first is "<<a<<endl;

    cout<<"second is "<<b<<endl;

     

    return 0;

}


Comments

Popular posts from this blog

250+ C Programs for Practice

FUNCTION OVERRIDING IN CPP