局部变量和全局变量的相关问题

来源:互联网 发布:js 识别浏览器 编辑:程序博客网 时间:2024/05/18 13:07
#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;}