一.三道考题 开讲之前,我先请你做三道题目.(嘿嘿,得先把你的头脑搞昏才行--唉呀,谁扔我鸡蛋?)考题一,程序代码如下:void Exchg1(int x, int y){ int tmp; tmp = x; x = y; y = tmp; printf("x = %d, y = %d\n", x, y);}main(){ int a = 4,b = 6; Exchg1(a, b); printf("a = %d, b = %d\n"
package main //.... 加参数类型 func Sum(nums ...int)int{ total:=0 for _,num:=range nums{ total+=num } return total } func main(){ // Providing four arguments total :=Sum(1,2,3,4) println("The Sum is:",total) // Providing three arguments total = Sum(5