会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
web1013
博客园
首页
新随笔
联系
订阅
管理
2018年7月9日
第 17 章 高级数据表示(测试队列)
摘要: 1 /* 2 queue.h -- Queue接口 3 */ 4 5 #ifndef QUEUE_H 6 #define QUEUE_H 7 8 #define MAXQUEUE 10 9 10 typedef int Item; 11 12 typedef struct node 13 { 14
阅读全文
posted @ 2018-07-09 22:49 web1013
阅读(283)
评论(0)
推荐(0)
2018年7月4日
第 17 章 高级数据表示(链表)
摘要: 1 /* 2 list.h -- 简单链表类型的头文件 3 */ 4 5 #ifndef LIST_H 6 #define LIST_H 7 8 #define TSIZE 45 9 10 typedef struct film 11 { 12 char title[TSIZE]; 13 int r
阅读全文
posted @ 2018-07-04 15:05 web1013
阅读(279)
评论(0)
推荐(0)
2018年7月3日
第 16 章 C 预处理器和 C 库(可变参数:stdarg.h)
摘要: 1 /* 2 varargs.c -- use variable number of arguments 3 */ 4 5 #include <stdio.h> 6 #include <stdarg.h> 7 8 double sum(int, ...); 9 10 int main() 11 {
阅读全文
posted @ 2018-07-03 22:22 web1013
阅读(171)
评论(0)
推荐(0)
第 16 章 C 预处理器和 C 库(string.h 库中的 memcpy() 和 memmove())
摘要: 1 /* 2 mems.c -- 使用 memcpy() 和 memmove() 3 */ 4 5 #include <stdio.h> 6 #include <string.h> 7 #include <stdlib.h> 8 9 #define SIZE 10 10 11 void show_a
阅读全文
posted @ 2018-07-03 15:15 web1013
阅读(183)
评论(0)
推荐(0)
第 16 章 C 预处理器和 C 库(qsort() 函数)
摘要: 1 /* 2 qsorter.c -- 用 qsort() 排序一组数字 3 */ 4 5 #include <stdio.h> 6 #include <stdlib.h> //提供函数 rand() 原型 7 8 #define NUM 40 9 10 void fillarray(double
阅读全文
posted @ 2018-07-03 14:05 web1013
阅读(185)
评论(0)
推荐(0)
第 16 章 C 预处理器和 C 库(直角坐标转换极坐标)
摘要: 1 /* 2 rect_pol.c -- 把直角坐标转换为极坐标 3 */ 4 5 #include <stdio.h> 6 #include <math.h> 7 8 #define RAD_TO_DEG (180 / (4 * atan(1.0))) 9 10 typedef struct po
阅读全文
posted @ 2018-07-03 10:50 web1013
阅读(264)
评论(0)
推荐(0)
第 16 章 C 预处理器和 C 库(预定义宏)
摘要: 1 /* 2 predef.c -- 预定义宏和预定义标识符 3 */ 4 5 #include <stdio.h> 6 7 void why_me(void); 8 9 int main() 10 { 11 printf("The file is %s.\n", __FILE__); 12 pri
阅读全文
posted @ 2018-07-03 10:08 web1013
阅读(153)
评论(0)
推荐(0)
2018年6月26日
第 16 章 C 预处理器和 C 库(条件编译)
摘要: 1 /* 2 names_st.h -- names_st 结构的头文件 3 */ 4 #ifndef NAMES_ST_H 5 #define NAMES_ST_H 6 7 #include <string.h> 8 9 #define SLEN 32 10 11 //结构声明 12 struct
阅读全文
posted @ 2018-06-26 15:10 web1013
阅读(220)
评论(0)
推荐(0)
2018年6月25日
第 15 章 位操作(dualview)
摘要: 1 /* 2 dualview.c -- 位字段和按位运算符 3 */ 4 5 #include <stdio.h> 6 #include <limits.h> 7 8 //边框线样式 9 #define SOLID 0 10 #define DOTTED 1 11 #define DASHED 2
阅读全文
posted @ 2018-06-25 10:41 web1013
阅读(447)
评论(0)
推荐(0)
2018年6月21日
第 15 章 位操作(invert4)
摘要: 1 /* 2 invert4.c -- 使用位操作显示二进制 3 */ 4 5 #include <stdio.h> 6 #include <limits.h> //提供 CHAR_BIT 的定义,CHAR_BIT 表示每字节的位数 7 8 char* itobs(int, char*); 9 vo
阅读全文
posted @ 2018-06-21 10:17 web1013
阅读(151)
评论(0)
推荐(0)
下一页
公告