More actions
imported>rino0601@naver.com No edit summary |
imported>jereneal20 No edit summary |
||
| Line 21: | Line 21: | ||
} | } | ||
== 댓글 == | == 댓글 == | ||
뭔가 설명을 달어 | |||
Revision as of 08:50, 16 May 2011
#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;
}
댓글
뭔가 설명을 달어