// ConsoleApplication3.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "iostream"
using namespace std;
void degistir(int a,int b)
{
	int gecici=a;
	a=b;
	b=gecici;
}
void degistir_r(int &a,int&b)
{
	int gecici=a;
	a=b;
	b=gecici;
}
void degistir_p (int *a,int *b)
{
	int gecici=*a;
	*a=*b;
	*b=gecici;
}
int _tmain(int argc, _TCHAR* argv[])
{
	int a=0;
	int b=1;
	int *x=&a;
	int *y=&b;
	cout<<"a="<<a<<"\tb="<<b<<endl;
	degistir(a,b);
	cout<<"a="<<a<<"\tb="<<b<<endl;
	degistir_p(x,y);
	cout<<"a="<<a<<"\tb="<<b<<endl;
	degistir_r(a,b);
	cout<<"a="<<a<<"\tb="<<b<<endl;
	system("pause");
	return 0;
}

