我写了这段代码很简单,所以我不明白为什么**str1
和**str2
一样?
代码
#include <stdlib.h>
#include <stdio.h>
int main() {
char *str1 = "Hey, you";
char *str2 = malloc(11);
strcpy(str2, "Hey! You");
if (*str1 == *str2) {
printf ("HoHoHo!");
}
return 0;
}