牛魔王的故事
提高运行速度在函数带如参数的时候会非常的方便处理链表很方便就是处理起来麻烦在函数带如参数的时候会非常的方便例如void swap(int *x, int *y){int p = *y;*y = *x;*x = p;}void main(){int a[10],i;int max,min,max_i = 0,min_i = 0;scanf("%d",&a[0]);max = min = a[0];for(i = 1; i <10; i++){scanf("%d",&a[i]);if(max <a[i]){max = a[i];max_i = i;}if(min > a[i]){min = a[i];min_i = i;}}swap(&a[max_i], &a[min_i]);for(i =0 ; i <10; i++){printf("%d ", a[i]);}}