版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/abc15766228491/article/details/81490565
#include <iostream>
using namespace std;
int main() {
char str1[]="hello";
char str2[]="hello";
char *str3="hello";
char *str4="hello";
if (str1==str2)
cout<<"yes"<<endl;
else
cout<<"no"<<endl;
if (str3==str4)
cout<<"yes"<<endl;
else
cout<<"no"<<endl;
return 0;
}
/*
* output:
no
yes
*/