2011_2华中科技大学机试真题
来源:互联网 发布:一个c语言源程序是由 编辑:程序博客网 时间:2024/04/30 14:32
#include<stdio.h>#include<stdlib.h>#include<malloc.h>int cmp(const void *a,const void *b){return *((int *)a)-*((int *)b);}int main(){int *a;int n=0,i;a=(int *)malloc(sizeof(int));while(~scanf("%d",&i)){n++;a=(int *)realloc(a,n*sizeof(int));a[n-1]=i;}for(i=0;i<n-1;i++)printf("%d ",a[i]);printf("%d\n",a[i]);qsort(a,n,sizeof(int),cmp);for(i=0;i<n-1;i++)printf("%d ",a[i]);printf("%d\n",a[i]);return 0;}
0 0
- 2011_2华中科技大学机试真题
- 2012_2华中科技大学机试真题
- 2011_1华中科技大学机试真题
- 2011_3华中科技大学机试真题
- 2012_1华中科技大学机试真题
- 2011华中科技大学研究生复试机试之一
- Programming Notes 2011_2
- 2011华中科技大学研究生复试机试之二
- 2011华中科技大学研究生复试机试之三
- 2011级华中科技大学软件学院软件工程硕士培养方案(附课表)
- 华中科技大学的IP
- 华中科技大学社会系
- CentOS5华中科技大学更新源
- 06华中科技大学复试上机
- 华中科技大学IPV6设置,linux
- 华中科技大学海外校友录
- 华中科技大学网络教材
- 黑晓军 华中科技大学 博士 副教授
- jquery实现联想词搜索框和搜索结果分页
- 2011_1华中科技大学机试真题
- Hive的数据存储模型
- nslookup工具的使用方法
- 项目TestSC2SpO2DataToExcel
- 2011_2华中科技大学机试真题
- python学习笔记-(3)序列-Sequence
- HDU ACM 2206 IP的计算
- 有关Grails的事务
- Merge讲解与实例
- 2011_3华中科技大学机试真题
- OPENSSH - Build a backdoor
- ORACLE批量更新四种方法比较
- MAC 恢复jdk1.6