利用scanf输入字符串
时间: 2023-10-16 10:08:29 浏览: 111
可以利用scanf函数输入字符串。在使用scanf函数时,可以使用%s格式控制符来读取字符串。例如,下面是一个示例代码:
```c
#include <stdio.h>
int main() {
char str<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [用scanf_s输入字符串](https://blog.csdn.net/jin_2626/article/details/123130488)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [C语言scanf输入字符串,举例详解](https://blog.csdn.net/qq_44752641/article/details/106082289)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文