C 语言参考

函数: 表达式 (操作符 + 操作数(变量 + 常量))
数据: 变量 + 常量

预处理

  1. #include <stdio.h>
  2. #define STEP 20 //符号常量

数据类型

signed + unsigned

  1. char
  2. short (short int)
  3. int
  4. long (long int)
  5. float
  6. double (浮点默认)
  7. long double

函数

  1. if the return type is omitted, int is assumed -> dummy(){}
  2. C does not allow functions to be defined inside other functions.

Input/Output

char c = getchar();
putchar(c);

编译

  1. cc main.c getline.c strindex.c
  2. c main.c getline.o strindex.o

标签: none

添加新评论