关键词搜索

源码搜索 ×
×

据说,能把这个字符串题目做对的人,有,但寥寥无几!

发布2014-01-12浏览7482次

详情内容

  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. char str1[] = "123";
  6. char str2[] = "123";
  7. cout << (str1 == str2) << endl;
  8. char *str3 = "123";
  9. char *str4 = "123";
  10. const char *str5 = "123";
  11. char const * str6 = "123";
  12. char * const str7 = "123";
  13. cout << (str3 == str4) << endl;
  14. cout << (str3 == str5) << endl;
  15. cout << (str3 == str6) << endl;
  16. cout << (str3 == str7) << endl;
  17. return 0;
  18. }


结果为:

0

1

1

1

1



相关技术文章

最新源码

下载排行榜

点击QQ咨询
开通会员
返回顶部
×
微信扫码支付
微信扫码支付
确定支付下载
请使用微信描二维码支付
×

提示信息

×

选择支付方式

  • 微信支付
  • 支付宝付款
确定支付下载