随笔分类 -  C语言

InsertSort(插入排序)
摘要:1 /* 2 * InsertSort.c 3 * 4 * Author: MagicYun 5 * 6 * 7 */ 8 9 #include <stdio.h>10 #include <stdlib.h>11 12 void Show(int *list, int n)13 {14 int i;15 for(i = 0; i < n; i++)16 {17 printf("%d ", *(list + i));18 }19 printf("\n");20 }21 22 void InsertSort(int *list, 阅读全文

posted @ 2011-03-17 19:45 MagicYun 阅读(224) 评论(0) 推荐(0)

ShellSort(希尔排序)
摘要:/** ShellSort.c** Author: MagicYun** O(n^1.5) key: f(n) = 3 * f(n - 1) + 1**/#include <stdio.h>#include <stdlib.h>void Show(int *list, int n) //show the list{ int i; for(i = 0; i < n; i++) { printf("%d ",*(list + i)); } printf("\n");}void ShellInsert(int *list, int 阅读全文

posted @ 2011-03-17 19:32 MagicYun 阅读(211) 评论(0) 推荐(0)

C 语言 文件操作
摘要:程序中有时候,我们需要生成多个文件名连续的文件,那么我们就需要用到函数sprintf, swprintfint sprintf( char *buffer, const char *format [, argument] ... );int swprintf( wchar_t *buffer, const wchar_t *format [, argument] ... );RoutineRequ... 阅读全文

posted @ 2010-11-13 00:18 MagicYun 阅读(256) 评论(0) 推荐(1)

C语言 EAN13 条形码生成【bmp生成】
摘要:废话不多说直接上代码[代码][代码][代码] 阅读全文

posted @ 2010-10-14 18:39 MagicYun 阅读(1556) 评论(1) 推荐(2)

导航