1--字符串和数组的指向问题

#include <stdio.h>

int main()
{
	char str1[] = "hello world";
	char str2[] = "hello world";

	char *str3 = "hello world";
	char *str4 = "hello world";

	if (str1 == str2)
		printf("same
");
	else
		printf("don't same
");

	
	if (str3 == str4)
		printf("same
");
	else
		printf("don't same
");


	return 0;
}
// don't same
// same

  

原文地址:https://www.cnblogs.com/hgonlywj/p/4842574.html