0
Follow
3
View

C language on print array appears small box problem

xye20070408 注册会员
2023-02-25 23:26
  • This box may be an unknown value. When the array length is 20, before you encounter the value on your computer, you encounter the '\0' terminator and print it out. When the array length is 50, this unknown value on your computer is right before you encounter the '\0' terminator, so it is printed. The box is displayed because the value here has no corresponding character library on your computer.
  • suggests that str1[str1_lenght + i] = '\0' be given a terminator at the end of the string concatenation. No matter how long the array is, the output should be fine.

About the Author

Question Info

Publish Time
2023-02-25 23:26
Update Time
2023-02-25 23:26

Related Question

使用Python的字符串数据

Python输入多个字符串,加密后输出

当上传字段到github与API时,获得not json可序列化

Python:获取字典列表中的所有值[closed]

刚刚学习Python. 的小趴菜

Failed to write core dump. Minidumps are not enabled by default on client versions of Windows

Angular -动态选择Component

Ws-Federation在登录过程中保持重定向

python爬虫怎么实现可视化(那个效果图不会弄)

如何修改下面的驱动读整数的代码,读取这种字符串并用printf打印