标题:一道淘宝的笔试题_请大吓请点!
取消只看楼主
vincentcity
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2008-10-23
 问题点数:0 回复次数:0 
一道淘宝的笔试题_请大吓请点!
#include<iostream.h>

void main()
{
    char str1[]="abc";
    char str2[]="abc";
//    char *str = str1;
    const char str3[]="abc";
    const char str4[]="abc";
    const char *str5="abc";
    const char *str6="abc";
    if (str1==str2) cout<<"TRUE"<<endl;  
    else cout<<"FALSE"<<endl;           //FALSE;

    if (str3==str4) cout<<"TRUE"<<endl;
    else cout<<"FALSE"<<endl;        // FALSE;
    
   if (str5==str6) cout<<"TRUE"<<endl;   
    else cout<<"FALSE"<<endl;           //TRUE

}

为什么输出会是假呢?
搜索更多相关主题的帖子: 笔试 淘宝 
2008-10-23 22:51



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-240213-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.093481 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved