Answer the following statements true (T) or false (F)

1. Even though you have allocated memory by using new, there is no need to deallocate it with the delete command.
2. The method clear cannot simply set ItemCount to zero.
3. A class can have multiple destructors.
4. According to the text, you must write a destructor if your class allocates memory dynamically.
5. Classes that use dynamically allocated memory can depend on the compiler-generated destructor.

1. False
2. True
3. False
4. True
5. False

Computer Science & Information Technology

You might also like to view...

As you enter data, you can change the default value in the field to another value within the parameters of any ________

Fill in the blank(s) with correct word

Computer Science & Information Technology

Answer the following statements true (T) or false (F)

1) The sequence structure is built into C#. Unless directed otherwise, the computer executes C# statements one after the other in the order in which they are written. 2) The body of an if statement executes only if the condition is evaluated as true. 3) A selection statement chooses among alternative courses of action. 4) The first operand of the ternary operator is the condition.

Computer Science & Information Technology