1.求函数返回值,输入x=9999;
int func(x)
{
int countx = 0;
while(x)
{
countx ++;
x = x&(x-1);
}
return countx;
}
2.为什么返回局部变量的引用不好?
a,b,c,d不记得了,大概和内存,返回值等等有关。
k R,from the top to bottom:{2,3,4,5,6},逐个取出放入Queue Q ,再从Q中逐个取出放入R中,问现在
从上到下R中元素的排列?
4.在你自己定义的类中有什么是CLASSVIEW不会为你做的`:
(a) 析构器。 (b)拷贝构造函数 (c)构造函数 (不记得有没有这一项了) (d)(不记得了)
5.写出程序的结果:___________ __________________
int funa(int *a)
{
a[0] ++;
}
int funb(int b[])
{
b[1] += 5;
}