Roxar @NDC 2015

Question 1 of 3

Medal-premium 1

What is true about a Smart Pointers in C++?

Select one or more of the following:

  • There's an implementation available as part of the C++ standard library

  • The objects they point to are automatically deleted by the garbage collector

  • They are used to help ensure that programs are free of memory and resource leaks and are exception-safe

  • It was invented by John Smart

Question 2 of 3

Medal-premium 1

What is the order that objects in an array are destroyed in C++? MyClass objs[10];

Select one of the following:

  • The order is undefined

  • Objects will be destroyed in the same order as they were created

  • The order of destruction is the reverse of the order of construction

Question 3 of 3

Medal-premium 1

You were given a chunk of memory and constructed a new object in that chunk using placement new. What do you do to destroy that object again?

Select one of the following:

  • The destructor will be called automatically when the chunk of memory is freed

  • Placement new doesn’t require destruction of constructed objects

  • I will manually invoke the destructor of the object

  • A call to placement delete is necessary to destroy the object


Roxar @NDC 2015

Quiz by , created over 1 year ago

Take the Quiz and enter the draw for a USB charger at the end of each day and finally an iPad Mini on Friday.

Eye 1
Pin 0
Balloon-left 0
Created by roxar.ndc2015 over 1 year ago