求大侠解决
![](zzz/editor/img/code.gif)
#include<stdio.h> int* fun(void) { int *b=3; return b; } int main() { int *a=NULL; a=fun(); printf("%d",*a); getch(); return 0; }如上程序:运行结果很奇怪。
![](zzz/editor/img/code.gif)
#include<stdio.h> int* fun(void) { int *b; *b=3; return b; } int main() { int *a=NULL; a=fun(); printf("%d",*a); getch(); return 0; }改成这样的话,运行结果正确。
求详解,尽量详细一点,拜托了!