Constructors are

a- automatically called when your main() program instantiates an object
b- typically used to initialize an objects' data members
c- both a & b
d- none

c?

If the programmer does not explicitly define at least one constructor for a class

a- a compiler error will occur
b- the compiler implicitly creates a default constructor which does not perform any data member initialization
c- neither

c?

Using default arguments within a constructor definition

a- is not allowed by the compiler
b- is only valid if no other constructors are present within the class
c- allows for the initialization of data members when an object is first instantiated

c?

Which of the following is NOT true of a constructor and destructor of the same class

a- they both have same name aside from the tilde (~) char
b- they are both called once per object (in general)
c- they both are able to accept default arguments
d- both are called automatically, even if not defined in the class

d?

Thank You, egmik3

>c?
I suppose that would work, though the wording looks tricky.

>c?
You're so indecisive. One of them is right, so you can improve your chances to 50/50. :)

>c?
A pedantic view would say d for none of the above.

>d?
That's right, after a fashion, but you could be more right.

So I am guessing

1 = C
2 = B
3 = (ill wait on this one)
4 = D? [ are you saying I am correct with what answers he has given us? or there is a better answer other than D that is provided?]


Thank you for the links! I have been looking all over for all of these HW questions they seem to be tricky.

-egmik3

3 = (ill wait on this one)

You were correct with your first guess.

4 = D? [ are you saying I am correct with what answers he has given us? or there is a better answer other than D that is provided?]

I believe it's the latter. ;)

This article has been dead for over six months. Start a new discussion instead.