#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char *InitMemory() //指针函数
{
char *s = (char *)malloc(sizeof(char) * 32); //堆空间,函数运行完不会释放
return s;
}
int main()
{
char *ptr = InitMemory();
strcpy(ptr, "helloworld");
printf("%s\n", ptr);
free(ptr);
return 0;
}