#include <stdio.h>
char *fun(void)
{
char str[] = "hello world !/n";//gcc编译不通过,pointer_arrary.c:7: warning: function returns address of local variable
// char *str = "hello world !/n";//返回hello world !
return str;
}
int main(int argc,char *argv[])
{
char *a = fun();
printf("%s",a);
return 0;
}#include <stdio.h>
char *fun(void)
{
char