Question: C# 1. In .NET, memory allocated on the heap is cleaned up by what? The Trash Compactor Star Destroyer The delete keyword The Garbage Collector
C#
1. In .NET, memory allocated on the heap is cleaned up by what?
The Trash Compactor
Star Destroyer
The delete keyword
The Garbage Collector
setting the variable to null
2. Recursion is ___________
An easy way to write an infinite loop.
A way to solve a problem by breaking it into smaller versions of the problem.
Just like a for-loop.
A way to curse again.
3. Given the following code, what will be displayed?
int[] array = { 1, 3, 5, 4, 10 }; Console.WriteLine(array[7 % 3]); |
4. What reasons should you eliminate duplicate code? Choose all that apply
It's easier to test
It's more error prone to have duplicate code.
It's harder to update or change duplicated code.
Cloning is evil.
5. It is usually better to favor composition over ____________________
Inheritance
Encapsulation
Polymorphism
Abstraction
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
