C 语言参考
函数: 表达式 (操作符 + 操作数(变量 + 常量))
数据: 变量 + 常量
预处理
#include <stdio.h>
#define STEP 20 //符号常量
数据类型
signed + unsigned
- char
- short (short int)
- int
- long (long int)
- float
- double (浮点默认)
- long double
函数
- if the return type is omitted, int is assumed -> dummy(){}
- C does not allow functions to be defined inside other functions.
Input/Output
char c = getchar();
putchar(c);
编译
- cc main.c getline.c strindex.c
- c main.c getline.o strindex.o