更新时间:2023-01-19 17:20:15
写在 printf文档 [ ^ ]:
Written in the printf documentation[^]:
请参阅 printf - C ++参考a> [ ^ ]描述:
See the printf - C++ Reference[^] description:
返回值>
成功时,返回写入的字符总数。
Return Value
On success, the total number of characters written is returned.
您正在打印一个字符(空格),所以 printf()
返回1.然后添加 m
的值,即5并将结果分配给 k
。
You are printing one character (a space), so printf()
returns 1. You then add the value of m
which is 5 and assign the result to k
.