阿杰杰
說 2009-07-19T03:40:57.000Z
#include <stdio.h>
#include <stdlib.h>
int yy = 2;
void swap(int xx, int *yy);
main(void){
int xx = 3;int tmp ;
tmp = xx;
xx = yy;
latest #8
阿杰杰
說 2009-07-19T03:41:35.000Z
yy = tmp;
printf("\n xx = %d ", xx );
// xx = _____
printf("\n yy = %d ", yy );
// yy = _____
xx = tmp + yy;
swap( xx, &yy );
阿杰杰
說 2009-07-19T03:41:52.000Z
printf("\n yy = %d ", yy );
// yy = _____
system("pause");
}
void swap(int xx, int *yy) {
int tmp ;tmp = xx;
xx = *yy;
*yy = tmp;
阿杰杰
說 2009-07-19T03:41:59.000Z
printf("\n xx = %d ", xx );
// xx = _____
printf("\n *yy = %d ", *yy );
// *yy = _____
}
阿杰杰
說 2009-07-19T03:42:29.000Z
其實我最不會第三個YY為什麼是3
徐QQ
說 2009-07-19T10:13:58.000Z
沒人回你耶
阿杰杰
說 2009-07-19T12:55:12.000Z
有一個
球球球♥
說 2009-07-19T19:01:17.000Z
他這邊已經宣告int xx = 3; int tmp ;所以xx=3=tmp 然後 xx = yy; 所以yy=3 應該是這樣吧xD
back to top