c语言中,如何定义一个以数组为参数的函数,函数的功能是将数组中的每一个元素从小到大排列

日期:2016-12-06 07:51:19 人气:1

c语言中,如何定义一个以数组为参数的函数,函数的功能是将数组中的每一个元素从小到大排列

#include void sort(int *begin,int *end){ int i,j; int length=end-begin; for(i=0;i*(begin+j+1)) { int temp=*(begin+j); *(begin+j)=*(begin+j+1); *(begin+j+1)=temp; } } }}
    A+
热门评论