t=(char*)malloc(n*sizeof(char))//表示申请了n个char类型大小的内存赋值给指针t. strlen();//表示求字符串长度
计算s的长度+1给t分配了nsizeof(char)大小的空间给p分配了nsizeof(char)大小的空间