作者adddream (哆啦A孟)
站内Electronics
标题[问题]问个c语言问题
时间Sat Feb 24 16:55:14 2007
假设传递一个字串给函数strpcy
strpcy(s,t)
char *s, *t;
{
while(*s++ = *t++);
}
请问
(1)为什麽当t指向'\0'时 while会停止回圈
(2)为什麽当*s 和 *t 宣告为 int 时 , while回圈无停止机制
以上
谢谢各位大大了
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 61.59.234.238
※ 编辑: adddream 来自: 61.59.234.238 (02/24 17:13)