printf 不换行怎么写
时间: 2023-10-13 11:58:20 浏览: 337
引用\[2\]中提到,如果想要在使用printf函数时不换行,可以在输出的字符串后面加上换行符"\n"。例如,将printf("1")改为printf("1\n"),将printf("2")改为printf("2\n")。这样就可以实现不换行输出了。
#### 引用[.reference_title]
- *1* *2* [linux下printf实现不换行打印(printf显示不加换行的缓冲问题)](https://blog.csdn.net/wangtingyao1990/article/details/50036293)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [C语言 自带换行的 printf 函数](https://blog.csdn.net/bebebug/article/details/127642415)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文