读书人

微软笔考试题多少分算高分

发布时间: 2013-04-20 19:43:01 作者: rapoo

微软笔试题多少分算高分
今天微软笔试了,我去,倒扣分太犀利了,我有一道题涂错了,一来一去近10分,心碎啊~
请问各位大概多少分才能进下一轮呢?
大多C/C++基础和数据结构

VS实测都返回1
[解决办法]

引用:
return "micosoft"=="micosoft";

Debug和release状态分别返回0和1
求解释啊

release 优化后把两个 string literal 合并了,debug 没有呗,标准没有要求是否必须合并,所以怎么弄都行。
[解决办法]
引用:
引用:return "micosoft"=="micosoft";

Debug和release状态分别返回0和1
求解释啊
release 优化后把两个 string literal 合并了,debug 没有呗,标准没有要求是否必须合并,所以怎么弄都行。


我也是那么想的,问题是,这个题本身没有标准答案。

难道说MS是在考“没有标准答案”这件事情本身么;否则,也就太那个什么了
[解决办法]
引用:
return "micosoft"=="micosoft";

Debug和release状态分别返回0和1
求解释啊


这个, 叫做 "StringPooling "

编译器选项: /GF (Eliminate Duplicate Strings)
debug 不优化. O1/O2等,都自动优化.

String pooling allows what were intended as multiple pointers to multiple buffers to be multiple pointers to a single buffer. In the following code, s and t are initialized with the same string. String pooling causes them to point to the same memory:
char *s = "This is a character buffer";
char *t = "This is a character buffer";


也许有编译器,不优化. 但很明显, 去的是痿软, 他的VC编译器,就是优化的

读书人网 >C++

热点推荐