1. 用预处理指令#define 声明一个常数,用以表明1年中有多少秒(忽略闰年问题)
#define SEC_YEAR(365*24*60*60UL)
1)C中数据的默认匹配类型顺序(int,long,long long),都不是unsighed;2)int类型在标准中定义为最小16位,long最小32位,所以如果用signged数据类型表示这个常数,会放不下,所以需要使用unsigned;另外,如果int只有16位,那么也放不下这个常数,所以需要使用long。3) 定义的时候使用了UL,在使用这个数据计算的时候就会用UL类型,运算的时候溢出的可能性就会减少。
2. copied from blog,
a) int a; // An integer
b) int *a; // A pointer to an integer
c) int **a; // A pointer to a pointer to an integer
d) int a[10]; // An array of 10 integers
e) int *a[10]; // An array of 10 pointers to integers
f) int (*a)[10]; // A pointer to an array of 10 integers
g) int (*a)(int); // A pointer to a function a that takes an integer argument and returns an integer
h) int (*a[10])(int); // An array of 10 pointers to functions that take an integer argument and return an integer