Jump to content


C++ test high score


5 replies to this topic

#1 loremaster

    New Member

  • Members
  • PipPip
  • 19 posts

Posted 24 July 2009 - 10:18 PM

To date; the highest score on the Introduction to C++ final exam at www.nethercode.com is 78%. The test is free to take!

#2 loremaster

    New Member

  • Members
  • PipPip
  • 19 posts

Posted 26 July 2009 - 03:07 AM

Holy cow!! so far only one person has been able to pass a basic C++ programming exam out of 67 attempts!

#3 .oisyn

    DevMaster Staff

  • Moderators
  • 1810 posts

Posted 26 July 2009 - 08:46 PM

Started on Sunday, July 26, 2009, 02:17 PM
Completed on Sunday, July 26, 2009, 02:55 PM
Time taken 37 mins 18 secs
Grade 99 out of a maximum of 100 (99%)

The exam stinks. Some questions require specific knowledge of non-standard C++ classes (probably tought in the course), some are formulated vaguely or ambiguously, and some are just plain wrong.

The questions that require specific knowledge are 5, 30, 36 and 47.

Question 19 is vague. It asks whether an implementation file contains an explanation of what each function does. The required answer is false, but in essense a list of statements *is* an explanation of what it does.

Question 20 is vague. It asks what number of 'rows' and 'columns' a 2d array has. C++ does not define words for the different dimensions. If I want my arrays to be column-major, the column is in the outer dimension, so I declare my array as int array[numColumns][numRows]. It is a matter of personal preference.

Question 25 is wrong, the 'else' part is not a statement on itself and is not part of the 'general case'

Question 27 is wrong. You don't have to write a struct one member at a time. Examples are:
MyStruct struct1 = { 1, 2, 3 }; // all members at once
MyStruct struct2;

struct2 = struct1; // also all members at once

Question 29 is vague. It says that in a deep copy, "all pointers have their own data". But 'their data' should actually refer to their contents, typically being the memory location to what they refer to. What they refer to is not their data. And as pointers being value types, they *always* have their own data, even when two pointers point to the same location.

Question 37 is vague. It says "the list cannot modify the actual parameter". But 'list' *is* the parameter. It is only a variable. Therefore, 'list' itself doesn't modify anything. Correct would be to say that the function seqSearch cannot modify 'list'.

Question 43 is wrong. All answers except b are acceptable.

Question 44 is wrong. The correct copy ctor syntax should contain a reference type, not a value type. The answer under 'a' is actually ill-formed in standard C++ (because that function itself requires a copy ctor, as the parameter is copied when called)

Question 45 is vague. It asks for the fifth row, but as explained in my comments on question 20 it is not defined what the row actually is.

Question 52 is vague. It is not clear what is meant by "all members". Of course, all members of a class/struct, even though that class/struct is just created for composition, are of the same class/struct.

Question 53 is wrong. If a queue is empty, back() might terminate the program, but it also might not. It is actually undefined what it does. It might just as well format your C: drive. This is what C++ calls "undefined behaviour", which is most definitely not the same as program termination.

Question 54 is vague, it does not describe which operator==(). Of course, a built-in operator== shall return bool, but a user defined operator== can return anything.

Question 79 is vague. '*' is not a symbol, but a literal. I myself interpreted as the star symbol (so without the quotes), as used in pointer declarations, which obviously has nothing to do with the 'char' datatype.

Question 84 is wrong. It will fail to compile for any template type parameter that is not convertible to size_t, which is what sizeof returns.
C++ addict
-
Currently working on: the 3D engine for Tomb Raider.

#4 alphadog

    DevMaster Staff

  • Moderators
  • 1603 posts

Posted 27 July 2009 - 07:43 PM

I never thought you could rip a new a**h*** on an exam, but .oisyn proves it possible. :P

#5 .oisyn

    DevMaster Staff

  • Moderators
  • 1810 posts

Posted 27 July 2009 - 09:44 PM

:P
C++ addict
-
Currently working on: the 3D engine for Tomb Raider.

#6 Goz

    Senior Member

  • Members
  • PipPipPipPip
  • 574 posts

Posted 04 August 2009 - 02:38 PM

Its a bit of a lame attempt at self advertising as well Mr Harvey ...

Why can't we take the test as a guest, for example? If i have to create an account .. i can't be bothered.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users