Contents Preface Preface to the first edition Introduction Chapter 1: A Tutorial Introduction Getting Started Variables and Arithmetic Expressions The for statement Symbolic Constants Character Input and Output File Copying Character Counting Line C
Preface Preface to the first edition Introduction Chapter 1: A Tutorial Introduction Getting Started Variables and Arithmetic Expressions The for statement Symbolic Constants Character Input and Output File Copying Character Counting Line Counting W
C经典书籍 The C programming Language By Brian W. Kernighan and Dennis M. Ritchie. Published by Prentice-Hall in 1988 Contents Preface Preface to the first edition Introduction Chapter 1: A Tutorial Introduction Getting Started Variables and Arithmetic E
stdarg宏:
可变参数列表是通过宏来实现的,这些宏定义于stdarg.h头文件,它是标准库的一部分。
这个头文件声明的一个va_list的类型,和三个宏va_start,va_arg,va_end。我们可以生明一个va_list类型的变量,配合三个宏使用。
va_start(arg, last have name arg);
初始化之后,arg将指向第一个无名参数。
va_arg(arg, next arg type);
va_arg将会返回当前的arg的va_list变量所指向