摘要: #include #include #include #include #include #define NOT_IN_MESSAGE "search %d not in %s\n "#define IN_MESSAGE "search %d in %s, that Index of array eq %d\n "#define ERROR -1#define MAX_INT_DIGIT 10int * getSizeTable();int str2int(char*);char * int2str(int);int binsearch(int , in 阅读全文
posted @ 2014-02-07 02:28 I return back 阅读(400) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 #include 4 #include 5 6 #define MAX_INT_DIGIT 10 7 8 9 int * getSizeTable(); 10 char* int2str(const int); 11 int power(int, int); 12 int str2int(const char*); 13 14 #define ERROR -1 15 16 17 main() 18 { 19 int n = 1024; 20 char* s = int2str(n); 21 ... 阅读全文
posted @ 2014-02-06 23:06 I return back 阅读(2877) 评论(0) 推荐(0)
摘要: 执行结果如下:本示例的测试环境是:操作系统:CentOS(Linux 192 2.6.18-348.6.1.el5 x86_64 GNU/Linux)编译器 :cc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-54)测试代码如下: 1 #include 2 #include 3 4 typedef struct point 5 { 6 int x; 7 int y; 8 char *description; 9 char *message;10 } Point;11 12 typedef union job13 {14 ... 阅读全文
posted @ 2014-01-29 09:36 I return back 阅读(593) 评论(0) 推荐(0)