CLASS - VIII
CHAPTER - 7 ( PROGRAMMING WITH ARRAYS )
Worksheets
Objective Type
Questions
Question 1 Which statement from below best describes Arrays?
Option 1 A data structure that shows a hierarchical behavior
Option 2 Container of objects of similar data types
Option 3 Array is not a data structure
Answer: Option 2
Question 2 Which of the following are advantages of arrays?
Option 1 Easier to store elements of similar data type
Option 2 Elements stored in an array cannot be sorted
Answer: Option 1
Question 3 Which of the following are disadvantages of arrays?
Option 1 There are chances of wastage of memory space if elements inserted
in an array are lesser than the allocated size
Option 2 Index value of an array can be negative
Option 3 Elements are sequentially accessed
Answer: Option 1
Standard Questions
1. What are arrays in programming?
Answer: Arrays are collection of similar data type
variables. Arrays do not support
different data types in same collection.
For example, you can make an Array of
Integers as well as another Array of
Strings.
2. Explain how arrays are indexed in programming.
Answer: An Array with variables of
Integer Data Type stored in it. Below is
the diagram that displays how data and
indexes are structured in such an Array:
3. Explain how you can sort an array {67, 23, 98, 19} using Coding?
Answer: Python has inbuilt sort function to order
an array. The sort() method sorts the list
ascending by default.
numbers = [ 67, 23, 98, 19]
numbers.sort()
Print(numbers)
4. How do you search a particular value from an array in Coding?
Answer: Python uses indexing as a method to
search for an element in an array.
x= [2,7,6,4,9,5,11]
print(x.index(9))