NEW
Font size
WorksheetsArrays in Swift
Total questions: 13
Worksheet time: 9mins
How many types of collections are provided by the swift?
Two
Three
Four
Five
The type of collection shown in the picture is an example of
Array
Set
Dictionary
The type of collection shown in the picture is an example of
Array
Set
Dictionary
The type of collection shown in the picture is an example of
Array
Set
Dictionary
An array is a collection of different data types.
True
False
The index number of first element of an array is
-1
0
1
If an array has a size of 8, then what is the index number of last element?
1
7
8
9
If an array has a size of 5, then what is the index number of the first element?
0
1
4
5
Which of the following shows correct declaration of an array Age and storing values 13, 14, 15, and 16 in it?
Age = 13, 14, 15, 16
var Age = 13, 14, 15, 16
Age = ("13", "14", "15", "16")
var Age = [13, 14, 15, 16]
Which of the following shows correct declaration of an array named as Cars and storing values Tesla, Ferrari, BMW in it?
Cars = [Tesla, Ferrari, BMW]
var Cars = ["Tesla", "Ferrari", "BMW"]
Cars = (Tesla, Ferrari, BMW)
var Cars = [Tesla, Ferrari, BMW]
What is the size of the array shown in the image?
4
5
17
14
The name of the array shown in the image is "Languages". What should be the code to print Swift?
print(Swift)
print(Languages)
print(Languages[0])
print(Languages[1])
The name of the array shown in the image is "Languages". What should be the code to print Java?
print(Java)
print(Languages)
print(Languages[1])
print(Languages[2])
