Strings without a '\0' char?

后端 未结 6 539
醉梦人生
醉梦人生 2020-12-10 18:58

If by mistake,I define a char array with no \\0 as its last character, what happens then?

I\'m asking this because I noticed that if I try to iterate th

6条回答
  •  情歌与酒
    2020-12-10 19:08

    This would happen if, by coincidence, the byte at *(str + 5) is 0 (as a number, not ASCII)

提交回复
热议问题