[C] 将串拷贝到新建的位置处 →→→→→进入此内容的聊天室

来自 , 2021-02-07, 写在 C, 查看 134 次.
URL http://www.code666.cn/view/6c97cd07
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <alloc.h>
  4.  
  5. int main(void)
  6.  {
  7.     char *dup_str, *string = "abcde";
  8.  
  9.     dup_str = strdup(string);
  10.     printf("%s\n", dup_str);
  11.     free(dup_str);
  12.  
  13.     return 0;
  14.  }
  15.  

回复 "将串拷贝到新建的位置处"

这儿你可以回复上面这条便签

captcha