惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Help Net Security
博客园 - Franky
GbyAI
GbyAI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
爱范儿
爱范儿
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
博客园_首页
MongoDB | Blog
MongoDB | Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recent Announcements
Recent Announcements
Scott Helme
Scott Helme
有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
C
CERT Recently Published Vulnerability Notes
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Jina AI
Jina AI
F
Fortinet All Blogs
N
Netflix TechBlog - Medium
L
LangChain Blog
L
LINUX DO - 最新话题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Hacker News: Front Page
MyScale Blog
MyScale Blog
P
Palo Alto Networks Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
AI
AI
T
Troy Hunt's Blog
Microsoft Azure Blog
Microsoft Azure Blog
阮一峰的网络日志
阮一峰的网络日志
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
S
Secure Thoughts
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
S
Security @ Cisco Blogs
Cloudbric
Cloudbric
E
Exploit-DB.com RSS Feed
Attack and Defense Labs
Attack and Defense Labs

博客园 - 高血压的熊

[转] SSL/TLS/WTLS原理 [转] Windows完成端口与Linux epoll技术简介 [转] STL之list的使用 [转] STL map常用操作简介 [收集] 工作面试时最难的25个问题 [转] 面试必问的16个经典问题的回答思路 [转] 如何用WIX ServiceInstall安装Windows服务 - 高血压的熊 [转] const int* p和int* const p [转] 彻底了解指针数组,数组指针,以及函数指针,以及堆中的分配规则 [原] 关于Vista下ERROR_ACCESS_DENIED问题解决办法 [转] Vista UAC详细使用方法 [收集] 经典C/C++面试题(六) [收集] 经典C/C++面试题(五) [收集] 经典C/C++面试题(四) - 高血压的熊 - 博客园 [收集] 经典C/C++面试题(三) [收集] 经典C/C++面试题(一) [转] Expect的基本用法 [转] CVS使用手册 [转] Session简介
[收集] 经典C/C++面试题(二) - 高血压的熊 - 博客园
高血压的熊 · 2008-06-19 · via 博客园 - 高血压的熊

1. 以下三条输出语句分别输出什么?[C易]
    char str1[]       = "abc";
    char str2[]       = "abc";
    const char str3[] = "abc"; 
    const char str4[] = "abc"; 
    const char* str5  = "abc";
    const char* str6  = "abc";
    cout << boolalpha << ( str1==str2 ) << endl; // 输出什么?
    cout << boolalpha << ( str3==str4 ) << endl; // 输出什么?
    cout << boolalpha << ( str5==str6 ) << endl; // 输出什么?

2. 非C++内建型别 A 和 B,在哪几种情况下B能隐式转化为A?[C++中等]
答:
    a. class B : public A { ……} // B公有继承自A,可以是间接继承的
    b. class B { operator A( ); } // B实现了隐式转化为A的转化
    c. class A { A( const B& ); } // A实现了non-explicit的参数为B(可以有其他带默认值的参数)构造函数
    d. A& operator= ( const A& ); // 赋值操作,虽不是正宗的隐式类型转换,但也可以勉强算一个

3. 以下代码中的两个sizeof用法有问题吗?[C易]
    void UpperCase( char str[] ) // 将 str 中的小写字母转换成大写字母
    {
        for( size_t i=0; i<sizeof(str)/sizeof(str[0]); ++i )
            if( 'a'<=str[i] && str[i]<='z' )
                str[i] -= ('a'-'A' );
    }
    char str[] = "aBcDe";
    cout << "str字符长度为: " << sizeof(str)/sizeof(str[0]) << endl;
    UpperCase( str );
    cout << str << endl;