gpt4 book ai didi

c - strcpy 的段错误

转载 作者:太空狗 更新时间:2023-10-29 16:39:27 32 4
gpt4 key购买 nike

<分区>

我想知道为什么我在下面的代码中出现段错误。

int main(void)
{
char str[100]="My name is Vutukuri";
char *str_old,*str_new;

str_old=str;
strcpy(str_new,str_old);

puts(str_new);

return 0;
}

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com