摘要: 先看下面一段程序,这段程序摘自《C 专家编程》:#include int array[] = {23,34,12,17,204,99,16};#define TOTAL_ELEMENTS (sizeof(array)/sizeof(array[0]))int main... 阅读全文
posted @ 2015-03-11 23:34 明月镇魂 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 这样一个题,据说是微软面试题:unsigned int i=3;cout<<i * -1;问结果是多少。 第一反应:-3。不过结果似乎不是这样的,写了个程序,运行了一下,发现是:4294967293。很诡异的一个数字,怎么也想不明白为什么会是这么个奇怪的数字。但是在我... 阅读全文
posted @ 2015-03-11 00:07 明月镇魂 阅读(318) 评论(0) 推荐(0) 编辑