Chat with us, powered by LiveChat GSP 125 Midterm Exam NEW | Writedemy

GSP 125 Midterm Exam NEW

GSP 125 Midterm Exam NEW

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

Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

Do you need an answer to this or any other questions?

About Writedemy

We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.

How It Works

To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Are there Discounts?

All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.

Hire a tutor today CLICK HERE to make your first order