会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
web1013
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
下一页
2018年6月21日
第 15 章 位操作(binbit)
摘要: 1 /* 2 binbit.c -- 使用位操作显示二进制 3 */ 4 5 #include <stdio.h> 6 #include <limits.h> //提供 CHAR_BIT 的定义,CHAR_BIT 表示每字节的位数 7 8 char* itobs(int, char*); 9 voi
阅读全文
posted @ 2018-06-21 10:13 web1013
阅读(152)
评论(0)
推荐(0)
2018年6月15日
第 14 章 结构和其他数据形式(函数指针)
摘要: 1 /* 2 func_ptr.c -- 使用函数指针 3 */ 4 5 #include <stdio.h> 6 #include <string.h> 7 #include <ctype.h> 8 9 #define LEN 81 10 11 char* s_gets(char *st, int
阅读全文
posted @ 2018-06-15 10:10 web1013
阅读(181)
评论(1)
推荐(1)
2018年6月14日
第 14 章 结构和其他数据形式(enum枚举)
摘要: 1 /* 2 enum.c -- 使用枚举类型的值 3 */ 4 5 #include <stdio.h> 6 #include <string.h> 7 //#include <stdbool.h> //C99特性 8 9 #define LEN 30 10 11 char* s_gets(cha
阅读全文
posted @ 2018-06-14 22:19 web1013
阅读(129)
评论(0)
推荐(0)
第 14 章 结构和其他数据形式(把结构内容保存到文件中)
摘要: 1 /* 2 booksave.c -- 在文件中保存结构中的内容 3 */ 4 5 #include <stdio.h> 6 #include <stdlib.h> 7 #include <string.h> 8 9 #define MAXTITL 40 10 #define MAXAUTL 40
阅读全文
posted @ 2018-06-14 16:31 web1013
阅读(197)
评论(0)
推荐(0)
第 14 章 结构和其他数据形式(伸缩型数组成员C99)
摘要: 伸缩型数组成员C99 声明一个伸缩型数组成员的规则: 1.伸缩型数组成员必须是结构的最后一个成员; 2.结构中必须至少有一个成员; 3.伸缩数组的方括号是空的。 示例 struct flex { int count; double average; double scores[]; //伸缩型数组成
阅读全文
posted @ 2018-06-14 09:47 web1013
阅读(327)
评论(0)
推荐(0)
2018年6月13日
第 14 章 结构和其他数据形式(names3)
摘要: 1 /* 2 names3.c -- 使用指针和 malloc() 3 */ 4 5 #include <stdio.h> 6 #include <string.h> //提供 strcpy()、strlen() 原型 7 #include <stdlib.h> //提供 malloc()、free
阅读全文
posted @ 2018-06-13 16:29 web1013
阅读(201)
评论(0)
推荐(0)
第 14 章 结构和其他数据形式(names)
摘要: 1 * 2 names1.c -- 使用指向结构的指针 3 */ 4 5 #include <stdio.h> 6 #include <string.h> 7 8 #define NLEN 30 9 10 struct namect 11 { 12 char fname[NLEN]; 13 char
阅读全文
posted @ 2018-06-13 14:33 web1013
阅读(148)
评论(0)
推荐(0)
2018年6月12日
第 13 章 文件输入/输出 (把文件附加到另一个文件末尾)
摘要: 1 /* 2 append.c -- 把文件附加到另一个文件末尾 3 */ 4 5 #include <stdio.h> 6 #include <stdlib.h> 7 #include <string.h> 8 9 #define BUFSIZE 4096 10 #define SLEN 81 1
阅读全文
posted @ 2018-06-12 10:22 web1013
阅读(356)
评论(0)
推荐(0)
2018年6月7日
第 13 章 文件输入/输出 (标准I/O)
摘要: 1 /* 2 count.c -- 使用标准 I/O 3 */ 4 5 #include <stdio.h> 6 #include <stdlib.h> //提供 exit() 函数原型 7 8 int main(int argc, char *argv[]) 9 { 10 int ch; //读取
阅读全文
posted @ 2018-06-07 10:30 web1013
阅读(207)
评论(0)
推荐(0)
2018年6月5日
第 12 章 存储类别、链接和内存管理(存储类别)
摘要: 1 /* 2 parta.c -- 不同的存储类别 3 */ 4 5 #include <stdio.h> 6 7 void report_count(); 8 void accumulate(int k); 9 10 int count = 0; //文件作用于,外部链接 11 12 int ma
阅读全文
posted @ 2018-06-05 13:59 web1013
阅读(216)
评论(0)
推荐(0)
上一页
1
2
3
4
5
下一页
公告