ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 22 May 2017 My Price 9.00

C and C++ Conventions and Language Features

 C and C++ Conventions and Language Features

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

Answers

(11)
Status NEW Posted 22 May 2017 03:05 AM My Price 9.00

-----------

Not Rated(0)