1.
How is an array identified?
Correct Answer
A. Through index
Explanation
An array is identified through its index, which is a numeric value that represents the position of each element within the array. The index allows us to access and manipulate specific elements in the array by referencing their position. By using the index, we can easily locate and retrieve data from the array.
2.
Which of these is most important in the storage of an array?
Correct Answer
C. Index tuple
3.
Which of these is the simplest type of array?
Correct Answer
D. Linear array
Explanation
A linear array is the simplest type of array because it is a basic data structure that stores elements in a linear sequence. It has a fixed size and each element is accessed by its index, starting from 0. Unlike other types of arrays mentioned in the options, a linear array does not have any specific conditions or loops associated with it. It is a straightforward and commonly used type of array in programming.
4.
What are two-dimensional arrays called?
Correct Answer
A. Matrices
Explanation
Two-dimensional arrays are called matrices because they are structured as a grid with rows and columns, similar to a mathematical matrix. Matrices are used to store and manipulate multiple values of the same data type. Each element in the matrix can be accessed using its row and column indices. Therefore, matrices are the correct term to describe two-dimensional arrays.
5.
How are tables implemented?
Correct Answer
A. By arrays
Explanation
Tables are implemented by arrays. In programming, a table is a data structure that stores information in an organized manner. Arrays are a type of data structure that allows multiple values to be stored under a single variable name. They provide a way to store and access data in a sequential manner, which makes them suitable for implementing tables. Each element in an array corresponds to a specific entry in the table, allowing for efficient storage and retrieval of data. Therefore, tables are commonly implemented using arrays.
6.
Which of the following cannot be considered a data structure?
Correct Answer
C. Elements
Explanation
The term "data structure" refers to a way of organizing and storing data so that it can be efficiently accessed and manipulated. Strings, lists, and arrays are all examples of data structures as they provide a way to store and organize data. However, "elements" cannot be considered a data structure as it is a generic term that does not refer to a specific way of organizing or storing data.
7.
Which of these can not be used to implement arrays?
Correct Answer
C. Factor servers
Explanation
Factor servers cannot be used to implement arrays because arrays require a contiguous block of memory to store elements, whereas factor servers are used for distributed computing and do not provide a contiguous memory space. Arrays are typically implemented using search trees, hash tables, or linked lists.
8.
Which of these does not refer to associative array?
Correct Answer
D. Elements
Explanation
The term "elements" does not refer to an associative array. Associative arrays are commonly referred to as maps, dictionaries, or symbol tables, but elements are the individual values or entries within an associative array. Therefore, "elements" is not a synonym for an associative array, making it the correct answer.
9.
Which of these is not required in manipulating dope vectors?
Correct Answer
C. Array enlargement
Explanation
Array enlargement is not required in manipulating dope vectors. Dope vectors are used to store information about arrays, such as their size, shape, and data type. Manipulating dope vectors involves operations such as resizing, applying non-linear formulas, and organizing the data in compact layouts. However, array enlargement is not necessary because the size of the array is already stored in the dope vector.
10.
What do store and select take?
Correct Answer
D. Constant time
Explanation
Store and select operations typically refer to operations performed on data in computer programming. In this context, "store" refers to the action of saving or storing data in memory, while "select" refers to the action of retrieving or selecting specific data from memory. These operations are not affected by the size or complexity of the data, and they take a constant amount of time to complete, regardless of the input. Therefore, the correct answer is "Constant time."