汇编网首页登录博客注册
240420643的学习博客
博客首页博客互动【做检测题】论坛求助

我的博客

个人首页 |  我的文章 |  我的相册 |  我的好友 |  最新访客 |  文章收藏 |  论坛提问 |  友情链接 |  给我留言  
图片载入中
学习动态
好友圈
文章收藏

[2008-08-04 14:24] 磁盘文件内容排序!!!(运用C快速排序和文件操作)

功能:向文本文件中写入数据并排序!!

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define num 4

struct data
{
char name[20];
char school[20];
char city[20];
char province[20];
}info;

struct data addrs[num]=
{
"wer","ukhj","gds","wert",
"357465","756386","rty","dfs4gh56s",
"ryje","q...
阅读全文 | 评论次数(0) | 浏览次数(292) | 所属类型(C语言)

[2008-06-11 21:32] 快速排序的例子!!

正在快速排序,电子书上的例子太复杂,就在网上找了简单的例子!

#include <stdio.h>
void quick_sort(int x[],int low,int high);

void main()
{
  int i;
  int x[]={2,56,89,52,41,56,92,31,25,21,3};
  quick_sort(x,0,10);
  for(i=0;i<11;i++)
  printf("%4d",x[i]);
}

void quick_sort(int x[],int low,int high)
{
int i,j;
i...
阅读全文 | 评论次数(2) | 浏览次数(375) | 所属类型(C语言)

[2008-05-14 21:42] 今天终于大致明白了队排序!!

今天终于大致明白了队排序!!
好象已经断断续续想了几个星期了,哈哈!!!...
阅读全文 | 评论次数(4) | 浏览次数(411) | 所属类型(C语言)
页码数(7):  1  2  3  4  5  6  7