- 博客(5)
- 资源 (4)
- 收藏
- 关注
原创 C语言摘要 -- K&R笔记(5)
本文是对《K&R》第七章《Input and Output》的摘要。1. getchar, putchar:针对字符的输入/输出,linux环境下可通过man或info命令查看帮助文档;2. printf,格式化输出。int printf(char *format, arg1, arg2, ...);参数format指定输出格式,符号%格式化对应的后续参数,基本规则为:a. 减
2013-03-27 11:20:03 1006
原创 C语言摘要 -- K&R笔记(4)
本文是对《K&R》第六章《Structures》的摘要。结构(struct)是其它数据类型的集合,用来构建聚合性更高更复杂的数据类型。1. struct的声明及初始化。关键字struct用来声明结构,基本语法规则为:struct {... /* struct members list here */ } x, y, z;可以看出其声明方式与其它普通数据类型声明一样,如:
2013-03-26 23:20:12 680
原创 C语言摘要 -- K&R笔记(3)
本文是对《K&R》第五章《Pointer and Arrays》的摘要。1. 指针是一种数据类型,其存储的内容是其它变量的内存地址,指针的合法值是合法内存地址或0(NULL)。一元操作符&与*用于指针操作:&:该操作符作用于变量,可理解为‘address-of’, &p即表示p的地址,由于改操作符的结果是得到一个内存地址,所以改操作符只能用于内存中的变量与数组元素,不能用于表达式(expr
2013-03-21 16:11:52 985
原创 C语言摘要 -- K&R笔记(2)
本文是对《K&R》第4章《Functions and Program Structure》的一个摘要。1. 函数定义范式为:return-type fun-name(arguments declarations){ declarations and statements}在函数定义中如果没有指定返回值,则默认为int型,通过-Wall编译器会显示相应的警告信息:f
2013-03-14 14:22:55 1369
原创 C语言摘要 -- K&R笔记(1)
本文是对《K&R》第二章 “Types, Operators, and Expressions” 的一个摘要。开篇第一段,原样摘抄下来:Variables andconstants are the basic data objects manipulated in a program.Declarations list the variables to be used, and sta
2013-03-06 13:03:57 742
Learning Perl 5th
2013-03-21
Agile+Web+Development+with+Rails
2013-03-21
A Stream InputOutput System -- Dennis M. Ritchie
2013-03-06
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人