Edit Game
C# Collections Review
 Delete

Use commas to add multiple tags

 Private  Unlisted  Public




Delimiter between question and answer:

Tips:

  • No column headers.
  • Each line maps to a question.
  • If the delimiter is used in a question, the question should be surrounded by double quotes: "My, question","My, answer"
  • The first answer in the multiple choice question must be the correct answer.






 Save   10  Close
What is the index of the first element in a List?
0!
What is one difference between a List and an Array?
A few! A List can change size, while an Array's size cannot change. A List can Add items dynamically. An Array is instantiated with square bracket notation.
What will be printed to the console?
40! After adding four elements to the List, the program loops through and calculates the sum of all the values (multiplied by 10).
What will be printed to the console?
3! There are three total elements added to the List.
What will be printed to the console?
6! It first gets the value of the List at index 0 (which is 1), and then adds 5 to it.
Will this code work?
NO! The index (2) is out of bounds, because there are only two elements in the List (at index 0 and index 1).
Will this code work?
YES! It properly creates a new List of integers, adds two values to it, and prints the value at index 1 to the console.
Will this code work?
YES! It properly creates a new List of integers and adds a value to it.
Will this code work?
NO! It is not possible to add an integer to a list of strings.
Will this code work?
NO! The myList variable is never initialized.