sort函数在C语言中的作用是啥?答:1、sort()函数描述:对给定区间所有元素进行排序。sort()函数语法:sort(begin,end),表示一个范围。2、sort()函数举例: 1 2 3 4 5 6 7 8 9 #include <algorithm> #include <iostream> using namespace std; main() { int a[11]={2,4,8,5,7,1,10,6,9,3};//a的长度=待排数据个数+1 sort(...
c语言:编写一个函数名字为sort,完成对三个整数从小到大排序,要求用指针...答:}if(*a>*c){d=*a;*a=*c;*c=d;}if(*b>*c){d=*b;*b=*c;*c=d;}printf("这个三个数从小到大排列是:%d,%d,%d\n",a,b,c);}void main(){int a,b,c,*x,*y,*z;printf("输入3个整数:");scanf("%d,%d,%d",&a,&b,&c);x=&a;y=&b;z=&c;sort(x,y,z)...