-
Notifications
You must be signed in to change notification settings - Fork 0
/
NOTE
17 lines (17 loc) · 1.07 KB
/
NOTE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
1. limits.h头文件中包含了关于此编译器实现的c数据类型的定义。
2. 使用转义字符的时候,可以使用'\','\0xxx'(0可以省略),'\0xxxx'
3. the difference of using sizeof array when main and using sizeof array when function
4. you can legally access the address of the array's last address + 1.
5. the difference of const point and point const
const int * pt; //this is a pointer --> a const value, but the value of pt can change
int * const pt; //this is a const pointer --> a variable, but the value of pt cannot change
const int * const pt;//this is a const pointer --> a const value, you cannot change either the value of pt nor the value of pt --> value
6. the difference of "int * pz[2]" and "int (*pz) [2]"
int * pz[2] --> int * is the array's type
int (*pz) [2] --> pz is a pointer to two dimensions's array
7. fgets(char* , int MAX, FILE* )
the difference between gets is that fgets can read the '\n' and add '\0' to the end, but the gets will replace the '\n' with '\0'
8. fgets and fputs
gets and puts
getchar and putchar
getc and putc