18. 错误举例:
由参数传递局部变量地址 由程序返回
int f(char ** fp) char* f(int i)
{ {
Char c=’a’; char c=‘a’;
*fp=&c;
return 0; return &c;
自动变量检查
} }
(error) Assigning address of (error) Return of the address
local auto-variable to a of an auto-variable
function parameter.