Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

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

From ZeroWiki
#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;
}

데블스캠프2006/화요일/pointer