1. Accidentally inheriting from the same class twice causes terrible ambiguity, and is known as (Points : 2) inheritance overload. the dreaded diamond of death. Von Neumann bottleneck. There is nothing wrong with inheriting the same class more than once. Question 2. 2. Creating classes in separate .h and .cpp files is good because (Points : 2) moving code to separate files is good design (separation of concerns). separating declaration from definition allows de-coupling of dependencies. many smaller files are easier to maintain by teams of programmers. All of the above Question 3. 3. Virtual methods are resolved at runtime by using a (Points : 2) dynamic list. virtual table. vector. haystack. Question 4. 4. Allowing many different types to be treated in the same way is called (Points : 2) polymorphism. multitypecasting. deep-copy. virtual. Question 5. 5. Heap memory is where (Points : 2) global variables and raw machine code are stored. local variables and execution of instructions is kept track of. dynamic memory is allocated to. None of the above Question 6. 6. Memory leaks in a computer program are (Points : 2) not a big deal because operating systems clean up all program memory. easy to find and debug in C and C++. difficult and important to manage in C and C++. a problem in every programming language. Question 7. 7. Virtual functions have a cost when compared to normal (statically bound) functions; specifically, they are (Points : 2) slower and less optimizable. less dynamic. unusable with polymorphism. more difficult to read than extern or static functions. Question 8. 8. The explicit keyword (Points : 2) labels data as being volatile. prevents constructors from automatically being called by implicit typecasting. marks a method as an override of a polymorphic base. identifies a variable that can be referenced but is defined in another compilation unit. Question 9. 9. Preprocessor macros (Points : 2) should be avoided if other langauge features will work just as well. can easily confuse other progammers not familiar with your macro. should be undefined after use to avoid polluting the global namespace. All of the above Question 10.10. Which piece of the C/C++ compile tool chain arranges compiled code into the final executable? (Points : 2) Preprocessor Compiler Linker Debugger
Previous answers to this question
This is a preview of an assignment submitted on our website by a student. If you need help with this question or any assignment help, click on the order button below and get started. We guarantee authentic, quality, 100% plagiarism free work or your money back.
Get The Answer