
Syed: 1D Array

Quiz
•
Computers
•
9th Grade
•
Medium
Syed M
Used 20+ times
FREE Resource
55 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
3 mins • 5 pts
What is an Array?
A data structure consisting of a collection of elements grouped under a single name.
A collection of functions grouped under a single name.
A variable that can store multiple data types simultaneously.
A programming method used to iterate through data elements.
Answer explanation
A data structure consisting of a collection of elements grouped under a single name.
2.
DRAG AND DROP QUESTION
3 mins • 5 pts
Can an Array store values of different datatypes?
(a)Yes
No
Maybe
Not sure
Possibly
Answer explanation
No, an Array cannot store values of different datatypes as it requires all elements to be of the same type.
3.
MULTIPLE CHOICE QUESTION
3 mins • 5 pts
Guess the output.
names=["Lisa","Jane","William"]
print(names[1])
Lisa
Jane
William
Error
Answer explanation
The correct answer is Jane because names[1] accesses the element at index 1 in the list, which is 'Jane'.
4.
MULTIPLE CHOICE QUESTION
3 mins • 5 pts
What is the ouput?
DECLARE nums: ARRAY[0:4] OF INTEGER
nums ← [5, 10, 15, 20, 25]
OUTPUT(nums[2])
5
10
15
25
Answer explanation
The output is 15 because nums[2] refers to the element at index 2 in the array nums, which is 15.
5.
MULTIPLE CHOICE QUESTION
3 mins • 5 pts
If an array data contains five elements [5, 3, 7, 1, 9], what is the value of data[3]?
5
3
7
1
Answer explanation
The value of data[3] is 1 because array indexing starts at 0, so data[3] refers to the fourth element in the array which is 1.
6.
MULTIPLE SELECT QUESTION
3 mins • 5 pts
Which pseudocode initializes an array of size 10.
DECLARE nums: ARRAY[0:9] OF INTEGER
DECLARE nums: ARRAY[1:10] OF INTEGER
DECLARE nums: ARRAY[1:9] OF INTEGER
DECLARE nums: ARRAY[0:10] OF INTEGER
Answer explanation
The correct pseudocode to initialize an array of size 10 is DECLARE nums: ARRAY[0:9] OF INTEGER or DECLARE nums: ARRAY[1:10] OF INTEGER.
7.
MATH RESPONSE QUESTION
3 mins • 5 pts
How many elements are in the following array?
DECLARE items: ARRAY[0:4] OF STRING
items ← ["apple", "banana", "cherry", "date", "elderberry"]
Mathematical Equivalence
ON
Create a free account and access millions of resources
Similar Resources on Wayground
50 questions
UJIAN SEKOLAH IX

Quiz
•
9th Grade
50 questions
MCQs on Java for Grade 8

Quiz
•
9th Grade
60 questions
UNIT 4 TEST OS, Hardware and Software Systems

Quiz
•
5th - 9th Grade
50 questions
Ôn tập KTGK2 Tin 11

Quiz
•
9th - 12th Grade
52 questions
Ulangkaji ASK Ting 2 Bab 3.1 Persekitaran Kod Arahan

Quiz
•
1st - 12th Grade
52 questions
ICT-CBP First Quarter Test 2023 NEWTON

Quiz
•
9th Grade
57 questions
CS: Python Unit 1 Review

Quiz
•
9th - 12th Grade
50 questions
Intro to Computer Science Unit 2

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
15 questions
Hersheys' Travels Quiz (AM)

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
30 questions
Lufkin Road Middle School Student Handbook & Policies Assessment

Quiz
•
7th Grade
20 questions
Multiplication Facts

Quiz
•
3rd Grade
17 questions
MIXED Factoring Review

Quiz
•
KG - University
10 questions
Laws of Exponents

Quiz
•
9th Grade
10 questions
Characterization

Quiz
•
3rd - 7th Grade
10 questions
Multiply Fractions

Quiz
•
6th Grade