Part I.ѡ:(70)
1.ֵx=9999;
int func(x)
{
int countx = 0;
while(x)
{
countx ++;
x = x&(x-1);
}
return countx;
}
1.ֵx=9999;
int func(x)
{
int countx = 0;
while(x)
{
countx ++;
x = x&(x-1);
}
return countx;
}
2.Ϊʲôؾֲòã
a,b,c,dǵˣźڴ棬ֵȵйء
3.Stack 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;
}
main()
{
int a[5] = {2,3,4,5,6};
int b[5] = {2,3,4,5,6};
int *p;
p = &a[0];
(*p)++;
funb(p);
for(int i = 0; i <5; i++)
printf("%d,",a[i]);
p = &b[1];
funa(p);//(дʱŷˣb[1]ĵַֻǵôַָˣʱ
//b.ҪDZһεfunbˡǺ)
funb(p);
for(i = 0; i < 5; i++)
printf("%d,",b[i]);
}
18.һ˵⣬öӢĵʲʶûŪ˼Ҳûмǵõдɣ÷һһءȻп
һ˵type errorĺô