Question: 1. A variable to store a pointer must be declared as a special pointer variable by placing an ampersand (&) before the pointer variable's name.

1.

A variable to store a pointer must be declared as a special pointer variable by placing an ampersand (&) before the pointer variable's name.

True

False

2.

If *p1 and *p2 are referencing two values, then the assignment *p2 = *p1 changes *p2 so that it copies the value that p1 points to.

True

False

3.

If a class uses dynamic memory, the automatic assignment operator (=) and the automatic copy constructor fail. Therefore, implementor of the class must provide member functions for the assignment operator and the copy constructor.

True

False

4.

Use the delete operator to return the memory used by a dynamic variable to the heap.

True

False

5.

The solution for the self-assignment is to provide a special boolean test that can be used at the start of any assignment operator:

// Check for possible self-assignment if (this == &source) return;

True

False

6.

The address "points" to the variable because it identifies the variable by telling where the variable is located in memory.

True

False

7.

The address "points" to the variable because it identifies the variable by telling where the variable is located in memory.

Group of answer choices

True

False

8.

A parameter that is a pointer or array may include the const keyword and the function cannot change the value in the location that the pointer points to.

Group of answer choices

True

False

9.

If p1 and p2 are pointer variables, then the assignment p2 = p1 changes p2 so that it points to the same variable p1 already point to.

Group of answer choices

True

False

10.

When using strcpy and strcat functions and also reading C-strings, you don't need to worry of these operations to check that the C-string variable actually has sufficient room to hold the copied C-string.

Group of answer choices

True

False

11.

Destructors are automatically activated when an object become inaccessible.

Group of answer choices

True

False

12.

Destructors are automatically activated when an object become inaccessible.

Group of answer choices

True

False

13.

When a value parameter is a pointer, the function may change the value in the location that the pointer points to.

Group of answer choices

True

False

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!