Swapping of Variables

Swapping of Variables:



Swapping:

Swapping of variables means Interchanging the values of variables

Program:

#include < iostream >
using namespace std;
int main()
{
int a = 10;
int b = 20;
int c;
c = a;
a = b;
b = c;
cout << a << " " << b << endl;
return 0;
}

Comments

Popular posts from this blog

How to display the output in C++