| | |
Any Help Appreciated, Stumped on HW questions
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
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
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.
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.
I'm here to prove you wrong.
Try researching a little bit. Obviously we are not going to give you the answers, although if you notice, Narue does give some hints
.
Here's some information for you:
http://www.parashift.com/c++-faq-lite/ctors.html
http://publib.boulder.ibm.com/infoce...ef/cplr376.htm
You won't understand all of this, but gather what you can to help you understand these questions.
.Here's some information for you:
http://www.parashift.com/c++-faq-lite/ctors.html
http://publib.boulder.ibm.com/infoce...ef/cplr376.htm
You won't understand all of this, but gather what you can to help you understand these questions.
"Technological progress is like an axe in the hands of a pathological criminal."
All my posts may be freely redistributed under the terms of the MIT license.
All my posts may be freely redistributed under the terms of the MIT license.
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
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
Last edited by egmik3; Dec 6th, 2006 at 12:30 am.
![]() |
Similar Threads
- Very strange hard drive failure problem, stumped totally. (Troubleshooting Dead Machines)
- Another not able to connect with IE after installing Linksys post (Networking Hardware Configuration)
- Windows Won't Start (Windows NT / 2000 / XP)
- Audio File Matching Program (C++)
Other Threads in the C++ Forum
- Previous Thread: Segmentation fault in C++
- Next Thread: Help!!!So lost
| Thread Tools | Search this Thread |
api array arrays beginner binary bitmap c++ c/c++ calculator char char* class classes coding compile compiler console conversion convert count data database delete desktop developer directshow dll dynamic dynamiccharacterarray email encryption error file forms fstream function functions game getline google graph homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return rpg sorting string strings struct template templates test text tree unix url vector video visualstudio win32 windows winsock word wordfrequency wxwidgets






