C Plus Plus Pointers

#include stdio(dot)h
#include conio
(dot)h

using namespace std;

void swapInteger(int *x, int *y){
int temp=*x;
*x=*y;
*y=temp;


}

main(){
int a, b;

cout<<"x: "; cin>>a;
cout<<"y: "; cin>>b;
swapInteger(&a, &b);
cout<<"X = "<<
cout<<"Y = "<

getch();
}

0 comments:

Post a Comment