strcmp函数作用
时间: 2023-10-21 20:57:58 浏览: 110
strcmp函数是用来比较两个字符串的函数。它会比较字符串1和字符串2的内容,并返回一个整数值。如果字符串1和字符串2相同,返回值为0;如果字符串1大于字符串2,则返回值大于0;如果字符串1小于字符串2,则返回值小于0。strcmp函数需要包含<string.h>头文件才能使用。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [strcmp函数详解](https://blog.csdn.net/Extreme_wei/article/details/128390699)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *3* [strcmp函数 strcmp函数 strcmp函数](https://download.csdn.net/download/righteousness/87840448)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文