#include#include #include#include#includestruct Student{int id;char name[20];char sex;int age;long long score;}temp;int cmp(const void *a,const void *b){    /* *(stu*)a是因为:a是个void *类型,要先    用(stu*)将它转成stu*类型,然后再用*取值,    变成stu类型,才能比较大小。*/    struct Student c=*(struct Student*)a;    struct Student d=*(struct Student*)b;    //按成绩升序排序     return d.score-c.score;}int main(){int i,j,n;//struct Student* stu = NULL;struct Student stu[1000];scanf("%d",&n);for(i=0;i
全部评论

相关推荐

积极的小学生不要香菜:你才沟通多少,没500不要说难
点赞 评论 收藏
分享
真三hjdlxn:这么能吹还能找不到实习啊? 市分行写TOP投行,2个月的实习写半页。
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务