博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
C语言 指针练习-直接插入排序法
阅读量:6913 次
发布时间:2019-06-27

本文共 779 字,大约阅读时间需要 2 分钟。

#include 
void print_result(float *,int); void Insert_Sort(float *,int); int main() {
int i; float array[10]; float * pointer; printf("请输入10个数:\n"); for(i=0;i<10;i++) {
scanf("%f",&array[i]); } pointer=array; Insert_Sort(pointer,10); print_result(pointer,10); return 0; } void print_result(float *p,int n) { //输出结果 int k; for(k=0;k

配一张以前的图片和代码

直接插入排序法

////============================== void InsertSort(int arr[],int n) {
printf("\n直接插入排序法过程:\n"); int i,j,t; for(i=1;i
arr[i]) {
t=arr[i]; arr[i]=arr[j]; arr[j]=t; } } int l=0; for(;l

转载于:https://www.cnblogs.com/ikodota/archive/2011/12/31/learn_pointer_insert_sort.html

你可能感兴趣的文章
我的友情链接
查看>>
leetCode 70. Climbing Stairs | 动态规划
查看>>
bboss标签使用大全-数据展示标签
查看>>
java中hashCode()与equals()详解
查看>>
点滴积累【JS】---JS小功能(createElement和insertBefore添加div下面的节点)
查看>>
异步提交form表单
查看>>
A Newbie’s Install of Keras & Tensorflow on Windows 10 with R
查看>>
关于使用input type=file 标签上传文件的注意细节(上传文件 无法获取文件 问题)...
查看>>
<if test="outState!=null">OUT_STATE=#{outState},</if>空格问题
查看>>
.Net内存回收
查看>>
js 获取/设置文本输入域内光标的位置的方法
查看>>
oracle sql developer 出现 : 适配器无法建立连接问题解决方案 The Network Adapter could not establish the connection...
查看>>
Linux下connect超时处理【总结】
查看>>
高性能数据库集群:读写分离
查看>>
Laravel 5.5 Blade::if 简介
查看>>
centos7搭建ELK Cluster集群日志分析平台(三):Kibana
查看>>
UITextField 监听内容变更解决方案
查看>>
详解jar命令打包生成双击即可运行的Java程序
查看>>
SAMBA 与ISCSI区别
查看>>
zabbix 历史数据清理及libdata1文件过大处理
查看>>