偶然发现在C中sizeof(void)是合法的,于是,对它的作用产生了疑问.查阅资料在GNU文档中发现如下解释: In GNU C, addition and subtraction operations are supported on pointers to void and on pointers to functions. This is done by treating the size of a void or of a function as 1. A consequence of…
A. extern函数 一个c文件生成一个obj文件 外部函数:允许其他文件访问.调用的函数(默认函数为外部函数),不允许存在同名的外部函数 my.c //define a extern function perfectly void extern testEx() { printf("my.c ==> call external function\n"); } main.c //declare the function first to apply the C99 co…