C语言编程一个给字符指针分配内存空间

做完后加分最好解析一下

#include <stdio.h>
#include <stdlib.h>
#define CHAR_POINT(p) (p) =  (char *)malloc(1024)

void main()
{
char *p = NULL;
gets(CHAR_POINT(p));
printf("%s\n",p);

}

温馨提示:答案为网友推荐,仅供参考