#include <iostream>
#include <stdio.h>
using namespace std;
main()
{
char str1[]="hello world";
char str2[]="hello world";
char *str3="hello world";
char *str4="hello world";
if(str1==str2)
cout<<"str1 and str2 is equal!"<<endl;
else
cout<<"str1 and str2 is not equal!"<<endl;
if(str3==str4)
cout<<"str1 and str2 is equal!"<<endl;
else
cout<<"str1 and str2 is not equal!"<<endl;
}
局部变量和全局变量的相关问题
最新推荐文章于 2023-01-28 16:48:48 发布