Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main(void) {
- char str1[10] = "ABC";
- char str2[10] = "ABC";
- char *str3 = "ABC";
- if (strcmp(str1, str2) == 0) {
- puts("真");
- } else {
- puts("偽");
- }
- if (str3 == "ABC") {
- puts("str3 = 真");
- } else {
- puts("str3 = 偽");
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment