U E D R , A S I H C RSS

고한종/swap()

Difference between r1.1 and the current

@@ -1,3 +1,5 @@
[고한종]
{{{
#include <stdio.h>

@@ -22,3 +24,5 @@
}
}}}
== 댓글 ==
 
뭔가 설명을 달어




#include <stdio.h>

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

int main()
{
	int a=3 , b=5;
	printf("%d,%d\n",a,b);
	printf("%d,%d\n",&a,&b);
	swap(&a,&b);
	printf("%d,%d\n",a,b);
	printf("%d,%d\n",&a,&b);

	return 0;
}

댓글


뭔가 설명을 달어
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:28:43
Processing time 0.0718 sec