运行 ❯
获得您
自己的
网站
×
更改方向
更改主题,深色/浅色
转到 Spaces
#include <stdio.h> #include <string.h> int main() { char str1[] = "Hello"; char str2[] = "Hello"; char str3[] = "Hi"; // Compare str1 and str2, and print the result printf("%d\n", strcmp(str1, str2)); // Compare str1 and str3, and print the result printf("%d\n", strcmp(str1, str3)); return 0; }
0
-4