U E D R , A S I H C RSS

데블스캠프2006/화요일/pointer/문제1/김준석

== 문제 1 ==

~cpp
#include<iostream>
using namespace std;

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

void main(){

	  int a =1, b = 18;
	  cout << "a = " << a << "  b = " <<b << endl;
	  swap(&a,&b);
	  cout << "a = " << a << "  b = " <<b << endl;
}

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

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