请帮我解决二道简单的送分题,每题30分,急,帮帮忙好吗
以下的两个程序有没有错误,若没有请写出输出的结果,若有则指出来并改正。
#include "stdio.h"
#include "stdlib.h"
#include "string.h"
char* GetMemory();
void test();
int main()
{
test();
return 0;
}
void test()
{
char *str=NULL;
str=GetMemory();
printf("%s",str);
}
char *GetMemory()
{
char p[]="hello";
return(p);
}