
ASSESSMENT | ARRAY
Authored by Glaizess Salisi
Information Technology (IT)
University
Used 10+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
26 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
In C#, an array is:
A collection of values of the same type stored in consecutive memory locations.
A collection of values of different types stored together.
A method for repeating tasks.
A keyword used for sorting values.
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following is NOT true about arrays?
Array elements are accessed using an index.
The index of the first element starts at 0.
Arrays can store different data types in one collection.
Arrays have a fixed size once declared.
3.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which is a valid declaration of an integer array with 5 elements in C#?
int[] nums = new int[5];
int nums = {1, 2, 3, 4, 5};
array nums[5];
int nums = new int(5);
4.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Given int[] numbers = {10, 20, 30, 40};, what will numbers[0] return?
10
20
30
40
5.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which of the following correctly initializes a string array?
string fruits = {"Apple", "Banana", "Mango"};
string[] fruits = {"Apple", "Banana", "Mango"};
fruits string[] = {"Apple", "Banana", "Mango"};
array fruits = {"Apple", "Banana", "Mango"};
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
If an array is declared as int[] arr = new int[3];, what are the default values of its elements?
null
1
0
undefined
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which property is used to determine the number of elements in an array?
Count
Length
Size
Capacity
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?