Dashboard / Primer 2.0 - App Dev / Stage 1 / Software Fundamentals / Arrays
Quiz review
Started on Saturday, 18 May 2024, 9:33 PM
State Finished
Completed on Saturday, 18 May 2024, 9:44 PM
Time taken 11 mins 46 secs
Marks 17.50/20.00
Grade 87.50 out of 100.00
Feedback Congratulations! You have scored more than 80%.
Question 1
Correct
Mark 1.00 out of 1.00
53051
A mathematical quiz context happened in a school and the scores are stored in an array named quizmark. The coordinating person
wants to copy the quiz score into another array named copyquizmark. Which of these options will do that?
Select one:
a. copyquizmark[n] <- quizmark[n]
b.
FOR index <- 0 to n
copyquizmark[index] <- quizmark[index]
index <- index+1
END FOR
53051
c.
copyquizmark <- quizmark
d.
We cannot copy the values from one array to another.
Your answer is correct.
53051
Using for loop helps to copy the elements from one array to another array
The correct answer is:
FOR index <- 0 to n
copyquizmark[index] <- quizmark[index]
index <- index+1
END FOR
Question 2
Correct
Mark 1.00 out of 1.00
Assume,
number[100] <- 99.
How many elements can be stored inside the array variable number?
Select one:
a. 100
b. 99
c.
Infinite number of elements
d.
The statement gives no clue about the number of elements that can be stored
53051
Your answer is correct.
From the given statement, it is predictable that number 99 is assigned to 101 th position of the array. But, there is no clue about the total
size of the array and the number of elements that can be stored
The correct answer is:
The statement gives no clue about the number of elements that can be stored
Question 3
Correct
53051
Mark 1.00 out of 1.00
Map the scenario to its appropriate array type
Matrix multiplication 2D ARRAY
To create a list of all prime numbers below 100 1D ARRAY
Your answer is correct.
The correct answer is:
Map the scenario to its appropriate array type 53051
Matrix multiplication [2D ARRAY ]
To create a list of all prime numbers below 100 [1D ARRAY]
Question 4
Correct
Mark 1.00 out of 1.00
Which of the following are False with respect to the manipulation of arrays?
Select one or more:
a.
It is possible to increase the size of the array
b. Elements of array are stored in contiguous memory
c.
An array can store homogeneous data.
d.
An array can store heterogeneous data
Your answer is correct. 53051
An array can store homogeneous data. Elements of array are stored in contiguous locations and it is not possible to increase the array
size
The correct answers are:
It is possible to increase the size of the array ,
An array can store heterogeneous data
Question 5
Correct
53051
Mark 1.00 out of 1.00
Negative elements can be placed inside an array. State true / false
Select one:
True
False
Your answer is correct.
53051
Size of the array cannot be negative. But the elements stored inside an array can be negative
The correct answer is 'True'.
Question 6
Partially correct
Mark 0.50 out of 1.00
The names of all associates undergoing training are stored in an array named associate_name[50]. The 5th associates’ name is
retrieved as
Select one or more:
a.
associate_name[5]
b.
associate_name[4]
c.
associate_name[3+1]
d. associate_name[6]
53051
Your answer is partially correct.
since array index starts from 0, the fifth element is accessed is accessed by array[4]. It is possible to perform arithmetic operation in an
array position
You have correctly selected 1.
The correct answers are:
associate_name[4],
associate_name[3+1]
Question 7
Incorrect
53051
Mark 0.00 out of 1.00
Information about ___________ need not be specified when declaring an array
Select one:
a.
the name of the array
b.
53051
the data type of the array
c. the elements to be stored in the array
d.
the index of the array
Your answer is incorrect.
It is not mandatory to specify the elements to be stored in the array when declaring an array
The correct answer is: the elements to be stored in the array
Question 8
Correct
Mark 1.00 out of 1.00
It is not possible to do a search operation in an array that is not sorted. State True/False.
Select one:
True
False
Your answer is correct
It is not mandatory to sort an array when searching an element randomly. It can be either sorted or unsorted
The correct answer is 'False'.
Question 9
Correct
Mark 1.00 out of 1.00
53051
The operation of ordering the elements in the list is known as Sorting .
Your answer is correct.
Sorting is the process of ordering the elements
The correct answer is:
53051
The operation of ordering the elements in the list is known as [Sorting].
Question 10
Correct
Mark 1.00 out of 1.00
Random access is not possible in an array. State True/False
Select one:
True
53051
False
Your answer is correct.
Elements in an array is stored sequentially and contiguously, and can be accessed in a random manner.
The correct answer is 'False'.
Question 11
Correct
Mark 1.00 out of 1.00
Index is used to locate an element in an array.
Your answer is correct.
The correct answer is:
[Index] is used to locate an element in an array.
Question 12
Correct
Mark 1.00 out of 1.00
53051
Assume you have an array named numbers of size 10.
Which of the assignment is valid?
Select one or more:
a.
numbers[11] <- 6
b.
numbers[9] <- 5
c. numbers[10] <- 11
d. numbers[0] <- 10
53051
Your answer is correct.
array index starts from 0 to 9, for 10 elements. Assigning values to numbers[10],numbers[11] is not valid, since the index exceeds the
size of array resulting in unpredictable results
The correct answers are: numbers[0] <- 10, numbers[9] <- 5
53051
Question 13
Correct
Mark 1.00 out of 1.00
Which of the following statements is correct with respect to arrays?
Select one:
a.
Elements in an array are arranged in ascending order by default
b.
Elements in an array are arranged in descending order by default
c. Elements in an array are arranged contiguously.
Your answer is correct.
53051
Elements in an array are arranged in a contiguous manner and are of fixed size
The correct answer is: Elements in an array are arranged contiguously.
Question 14
Correct
Mark 1.00 out of 1.00
Expression within [ ] should always resolve to a positive number
Your answer is correct.
53051
Array size or index value is given inside square braces and should be a positive integer value
The correct answer is:
Expression within [ ] should always resolve to a [positive number]
Question 15
Incorrect
Mark 0.00 out of 1.00
53051
Consider you buy a laptop. You want to store the details of that laptop such as price,
model_name,model_number, warranty_period into a single array named details[10]. Is ths possible?
Select one:
a. Yes
b. No
Your answer is incorrect.
No, It is not possible. An array can store data of same type. since model_name consists of letters, model_no consists of number etc, it is
not possible to the details into a single array
The correct answer is: No
Question 16
Correct
Mark 1.00 out of 1.00
List of songs stored in your mobile phone is a good example for single-dimensional arrays
Your answer is correct.
one-d array is enough to store the list of songs in mobile phones.
The correct answer is:
List of songs stored in your mobile phone is a good example for [single‑dimensional arrays]
Question 17
Correct
Mark 1.00 out of 1.00
53051
Consider you want to compare the prices of redmi , sony, samsung phones in three online sites like amazon,flipkart,ebay.
Which array type is best suitable to do this comparision?
Select one:
a.
three-dimensional arrays
b.
one-dimensional array
c. two-dimensional arrays
53051
Your answer is correct.
To compare 3 mobile phones in 3 different online sites, 2-d arrays can be used.
The correct answer is: two-dimensional arrays
53051
Question 18
Correct
Mark 1.00 out of 1.00
It is possible to traverse through an array from the first position to the last and not vice versa. State true or false.
Select one:
True
False
Your answer is correct
an Array can be traversed from first to last and vice versa
The correct answer is 'False'.
Question 19
Correct
Mark 1.00 out of 1.00
53051
An Array consists of rows and columns is also called as________
Select one:
a. Three dimensional array
b. Two-dimensional array
c.
one-dimensional array
53051
Your answer is correct.
A matrix consists of rows and columns, also known as Two-dimensional arrays
The correct answer is: Two-dimensional array
53051
Question 20
Correct
Mark 1.00 out of 1.00
Choose the correct Pseudo code to store names in an array and display a name.
a.
BEGIN
INPUT name
PRINT name
DECLARE name [20]
END
b.
BEGIN
DECLARE name [20]
INPUT name
PRINT name
END
53051
c.
BEGIN
INPUT name
DECLARE name [20]
PRINT name
END
d.
BEGIN 53051
INPUT name
DECLARE name [20]
END
PRINT name
Your answer is correct.
The correct answer is:
53051
BEGIN
DECLARE name [20]
INPUT name
PRINT name
END
◄ Pseudocode using Arrays - Quiz
Jump to...
Pre-Quiz ►
53051
53051
53051