交換數值

*初學c語言時,大家一定在主函數裏面寫過交換兩個數得函數,那麼怎麼寫一個交換函數,主函數調用來實現數值交換呢?下面我們來看看: [1] 你是不是這樣寫的呢: # include <stdio.h> void swap(int a,int b) { int tmp; tmp=a; a=b; b=tmp; } int main() { int a=10;int b=10; printf("%d,%d"
相關文章
相關標籤/搜索