12题应该是d吧,指向objects that have been deallocated 的指针是NULL呀,static class member是没有this指针的,我不知道出题者是不是这个意思。其它的答案我赞同。
-oak(oak);
2001-7-6(#121779@0)
I guess the question was about a pointer to a static class memeber, what's wrong with that? This set of questions are very vague and not practical enough.
-numnum(numnum);
2001-7-6(#122517@0)
这不是指this指针,当然可以有指针指向static member
-goodman(goodman);
2001-7-6(#122692@0)
1)e d a a 5)a a d c 9)b b d d 13)d c b e 17) d b c c
-enchanted(密码);
2003-4-11(#1135295@0)
2) all legal C structure is legal in C++. But no function must be defined in a structure. So ans should be d
see inside and AS IS9) private member is protect from any friend and derived class. but I am not sure about c)10) >> do not exist in any lib. and it allow space charater
12) static class member do not allowed pointer, it like a global varible
13) inbuild data operator does not allow override
18) xyz=0xfffffffa abc=0xfffffffe xor result should be 4, so ans should be c
As is.
-enchanted(密码);
2003-4-11{360}(#1135321@0)
I am not a CP guy, but your post is really useful and I will copy and store. Why so many persons have different anwers?
-pyramid(金字塔);
2001-7-5(#120878@0)
I agree with others, but for No.1, I think the answer should be c.
An int array variable is actually equilvalent to int* const , a.k.a constant pointer to intergers.It's almost the same as int* when you pass it as parameters(because C++ pass param. by value), but compiler might give some warning. Let me try it out on gcc.
-numnum(numnum);
2001-7-5{159}(#121409@0)
It looks that the g++ didn't complain, so I agree with you
-numnum(numnum);
2001-7-5(#121413@0)
Can someone take a look at No.29, the one about switch statement, I suspect none of the choices is right.
-numnum(numnum);
2001-7-7(#123295@0)
i think D.How do you feel?
-goodbaby(小宝);
2001-7-7(#123327@0)
But in D, it says that the cases have to be in numeric ORDER, I understand the value after case has to be of integral type, but they don't have to be in a particular order(descending or ascending).
-numnum(numnum);
2001-7-7(#123429@0)
I guess it is C
-marriner(marriner);
2001-7-8(#124041@0)
I think c is wrong.switch i{
case 1:
break;
case 2:
...
}
Does i compare with 2?I think not.
-goodbaby(小宝);
2001-7-8{85}(#124262@0)
The cases must be in numeric order 可不可以理解为"所有的例子必须是可排序?"
-goodbaby(小宝);
2001-7-8(#124260@0)
these question are not so easyif can answer 75% without ref to compiler or book, u can be consider as good C/C++ programmer.
but on the otherside, not all the good programmer should be able to answer these question correctly, because most of the questions are :written code in bad manner and ask you what does it mean. What you should do is know there could be a problem and avoid write it in such a way, even u are clear abotu it. for example: c=26*b==0; even u know == is the lowest priority, u'd better add a (c=26*b)==0.
-blaise(blaise);
2001-7-6{498}(#122575@0)
strongly agree with you at it. easy-understand and simple is very important for coding.
-jami(jami);
2001-7-6(#122663@0)
reply for C++ Test1e, 2a,d 3a,b,c 4b 5a 6a 7d 8d 9c 10b 11d 12e 13d 14c 15b
16e 17d 18a 19c 20c
-stevencaiv(nick);
2001-7-7{95}(#123528@0)
faint! I can not work out most of them! By the way, I do not think a
well-managed company will let programmers write "25^x==6".
-marriner(marriner);
2001-7-8(#124038@0)