C C++C/C++ 笔试、面试题目大汇总 1.求下面函数的返回值(微软) int func(x) { int countx = 0; while(x) { countx ++; x = x&(x-1); } return countx; } 假定x = 9999。 答案:8 思路:将x转化为2进制,看含有的1... Heller 5年前 (2016-02-03) 1338℃ 0评论 0喜欢