标题:来看看这两个程序
取消只看楼主
showtime110
Rank: 1
等 级:新手上路
帖 子:13
专家分:0
注 册:2005-2-18
 问题点数:0 回复次数:0 
来看看这两个程序

#include <stdio.h> void copy(char *to,char *from )

{ while((*to++=*from++)!='\0'); } main() { char a[]="china"; char b[]="ewe"; copy(a,b); printf("%s\n",a); }

#include <stdio.h> void copy(char *to,char *from )

{ while((*to++=*from++)!='\0'); } main() { char *a="china"; char *b="ewe"; copy(a,b); printf("%s\n",a); } 这两程序有什么区别,为什么第二个不能得到正确结果

搜索更多相关主题的帖子: include china 
2005-03-04 14:27



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-12809-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.018481 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved