Recall & Review
beginner Click to reveal answer
What does 'Array Deletion at End' mean?
It means removing the last element from an array, reducing its size by one.
beginner Click to reveal answer
Why is deleting the last element in an array efficient?
Because it does not require shifting other elements; only the size or index tracking changes.
beginner Click to reveal answer
In C#, what happens if you try to delete an element from an empty array?
You cannot delete because the array has no elements; attempting to do so should be handled to avoid errors.
intermediate Click to reveal answer
Show a simple C# code snippet to delete the last element from an array using a List.
List<int> numbers = new List<int> {1, 2, 3};
numbers.RemoveAt(numbers.Count - 1); // Removes last element
intermediate Click to reveal answer
What is a limitation of deleting the last element directly from a fixed-size array in C#?
Arrays have fixed size; you cannot reduce their length. You must create a new smaller array or use a dynamic structure like List.
What is the main advantage of deleting the last element in an array?
✗ Incorrect
Deleting the last element does not require shifting other elements, making it efficient.
In C#, which data structure allows easy deletion of the last element?
✗ Incorrect
List supports dynamic size and allows removing the last element easily.
What happens if you try to remove an element from an empty List in C#?
✗ Incorrect
Removing from an empty List throws an ArgumentOutOfRangeException.
Which method removes an element at a specific index in a C# List?
✗ Incorrect
RemoveAt(index) removes the element at the given index.
Why can't you reduce the size of a fixed array in C# after creation?
✗ Incorrect
Arrays have a fixed length set at creation and cannot be resized.
Explain how to delete the last element from an array in C# and what limitations you might face.
Think about fixed arrays vs dynamic lists.
You got /4 concepts.
Describe why deleting the last element in an array is more efficient than deleting from the start or middle.
Consider what happens to other elements after deletion.
You got /4 concepts.
