題組內容

四、考慮下列程式片段: void main( ){ int value = 4, list = 8; swap(value, list); } void swap(int a, int b){ int temp; temp = a; b = temp; }

⑵若參數傳遞為以址傳遞(passed by address),則在 main()執行完 swap(value, list)後, 變數 value 及 list 的值各為多少?(10 分)