U E D R , A S I H C RSS

데블스캠프2006/화요일/pointer/문제1/정승희

No older revisions available

No older revisions available



~cpp
#include<iostream>
using namespace std;
void swap(int *a, int *b);
void main()
{
	int a=1, b=18;
	cout << a<<" "<< b<<endl;
	swap(&a, &b);
	cout <<a<<" "<<b<<endl;
}

void swap(int *a,int *b)
{
	int c;
	c = *b;
	*b = *a;
	*a = c;
}


Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:29:06
Processing time 0.0185 sec