📄 strcmp.c
字号:
/* The strcmp() function. */
#include <stdio.h>
#include <string.h>
int main( void )
{
char str1[80], str2[80];
int x;
while (1)
{
/* Input two strings. */
printf("\n\nInput the first string, a blank to exit: ");
gets(str1);
if ( strlen(str1) == 0 )
break;
printf("\nInput the second string: ");
gets(str2);
/* Compare them and display the result. */
x = strcmp(str1, str2);
printf("\nstrcmp(%s,%s) returns %d", str1, str2, x);
}
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -