Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. The key and value in a dictionary must be of the same type. 2. A ___ works si

ID: 3918359 • Letter: 1

Question

1. The key and value in a dictionary must be of the same type.

2. A ___ works similarly to an array; however, when you add or remove items it resizes itself.

3. You declare a list with code like below:

List<int> items = new List<int>();

You try to access the value using the code below, without adding items first:

int listValue = items[10];

What will happen?

4. Given the code below, what type is in the list?

List<string> names = new List<string>();

5. Which of the following is a valid example of calling a method and sending it an array argument?

6. A ____ is a data structure that uses a first-in-first-out order of accessing items.

7. A Dictionary may contain duplicate values.

8. You may use the foreach statement to iterate over both the keys and values in a dictionary.

9. The foreach statement may be used to iterate over the values in a list.

10. When items are added or removed, a list resizes itself.

True False

Explanation / Answer

1) The key and value in a dictionary must be of the same type.--> False
The key and value can be of different type

2) list

3)A run-time error generates.
4)string
5) DisplayArrayContents(aList);
6. A __Queue__ is a data structure that uses a first-in-first-out order of accessing items.
7. A Dictionary may contain duplicate values.-->True
8. You may use the foreach statement to iterate over both the keys and values in a dictionary.--> True
9. The foreach statement may be used to iterate over the values in a list.--> True
10. When items are added or removed, a list resizes itself.--> True



Thanks, PLEASE UPVOTE if helpful