且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

strlen的()非空值终止字符串的字符?

更新时间:2022-11-07 21:11:56

没有,它没有定义。它可能会导致存储器访问冲突,因为它会继续计数直到它达到第一存储器字节,其值是0

No, it is not defined. It may result in a memory access violation, as it will keep counting until it reaches the first memory byte whose value is 0.