Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

c++ questions 3. [4 marks] True or False: a) The vector size is fixed after it is created. b) We cannot return a vector from

c++ questions

3. [4 marks] True or False:

a) The vector size is fixed after it is created.

b) We cannot return a vector from a function.

c) We can use a vector object just like an array, but a vector's size can grow automatically when we call the push_back member function to add an element in the vector.

d) The statement vector x(10) creates a vector object of 10 int values. 4. [6 marks] True or False:

a) A derived class is a subset of a base class.

b) The derived class can access the private attributes of the base class using dot(.) operator directly.

c) The constructors of a base class are inherited in the derived class. The constructors of a base class should not be invoked from the constructors of the derived classes to initialize the attributes in the base class explicitly.

d) A derived class constructor always invokes its base class constructor. If a base constructor is not invoked explicitly, the base class default constructor is invoked by default.

e) When constructing an object of a derived class, the derived class constructor first invokes its base class constructor before performing its own tasks. When an object of a derived class is destroyed, the derived class destructor is called. After it finishes its tasks, it invokes its base class destructor.

f) A function defined in the base class may be redefined in the derived class. A redefined function must match the parameter list and return type of the function in the base class.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students explore these related Databases questions

Question

How do Data Types perform data validation?

Answered: 3 weeks ago

Question

How does Referential Integrity work?

Answered: 3 weeks ago