用此函数:
void *malloc(size_t size)
分配大小为size的区域  头文件<alloc.h>
size 内存大小,类型size_t的定义见stdlib.h文件
返回值:已分配内存的首地址
例子:
#include <stdio.h>
#include <string.h>
#include <alloc.h>
#include <process.h>
int main(void)
{
    char *str;
    if ((str = malloc(10)) == NULL)
    {
        printf("Not enough memory to allocate buffer
");
        exit(1);
    }
    strcpy(str, "Hello");
    printf("String is %s
", str);
    free(str);
    return 0;
}