malloc动态开辟内存空间
*函数声明:void malloc(unsigned size);
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
//malloc 动态开辟内存空间
int main() {
char buf[20] = "welcome to xian";
char* name;
name = (char*)malloc(sizeof(char) * 20);
strcpy(name, buf