#include<bits/stdc++.h>
using namespace std;
void swap(int *a, int *b){
int temp;
temp = *a;
*a = *b;
*b = temp;
}
int main()
{
int a= 2;
int b = 4;
swap(&a,&b);
cout<<a<<" "<<b<<endl;
return 0;
}
Don't worry World will Teach U
Comments
Post a Comment