Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Questions and Answers Q.1) The memory address of the first element of an array is called e. co m A. floor address B. Foundation Address C. first address D. base address ANSWER : base address SOLUTION : The memory address of the first element of an array is called base address. Q.2) The memory address of fifth element of an array can be calculated by the formula nl in A. LOC(Array[5]=Base(Array)+w(5-lower bound), where w is the number of words per memory cell for the array B. LOC(Array[5])=Base(Array[5])+(5-lower bound), where w is the number of words per memory cell for the array C. LOC(Array[5])=Base(Array[4])+(5-Upper bound), where w is the number of words per memory cell for the array D. None of above w .a p tio ANSWER : LOC(Array[5]=Base(Array)+w(5-lower bound), where w is the number of words per memory cell for the array SOLUTION : The memory address of fifth element of an array can be calculated by the formula is: LOC(Array[5]=Base(Array)+w(5-lower bound), where w is the number of words per memory cell for the array Q.3) Which of the following statements is not true? A. An array is a data structure containing a number of items of the same type B. An array is normally used to store two or more items of data C. The lower bound of an array can be declared as any unsigned value w D. The elements of an array can be initialized when the array is declared w ANSWER : The lower bound of an array can be declared as any unsigned value SOLUTION : As there is no any syntax to declare the lower bound of the array except the size of the array which can be declared. Q.4) Two dimensional arrays are also called ? A. Matrix Array B. Table Array C. Both a and b D. None of the Above ANSWER : Both a and b SOLUTION : Two dimensional arrays are called as matrix array and table arrays because they contains rows and columns. Q.5) Which of the following data structure is linear data structure? A. Trees B. Graphs C. Arrays D. None of above ANSWER : Arrays Page 1 Questions and Answers SOLUTION : A Linear Array is a list of finite number of n homogeneous data elements i.e. the elements of same data types. e. co m Q.6) Arrays are best data structures A. for relatively permanent collections of data B. for the size of the structure and the data in the structure are constantly changing C. for both of above situation D. for none of above situation in ANSWER : for relatively permanent collections of data SOLUTION : An array is a data structure that contains a group of elements. Typically these elements are all of the same data type, such as an integer or string. Arrays are commonly used in computer programs to organize data so that a related set of values can be easily sorted or searched. tio A. Linear arrays B. Linked lists C. Graphs D. Trees nl Q.7) Which of the following data structures are indexed structures? w .a p ANSWER : Linear arrays SOLUTION : Array may be defined abstractly as finite order set of homogeneous elements. So we can say that there are finite numbers of elements in an array and all the elements are of same data type. Also array elements are ordered i.e. we can access a specific array element by an index Q.8) The simplest type of data structure is .................. w w A. Multidimensional array B. Linear array C. Two dimensional array D. Three dimensional array ANSWER : Linear array SOLUTION : A Linear Array is a list of finite number of n homogeneous data elements i.e.the elements of same data types. All arrays are linear data structures, as are all lists. Arrays are linear because multiple elements are allocated in contiguous memory. If the array is a pointer array, only the pointer array need be contiguous; the data being pointed at can reside anywhere in memory, whether contiguous or not (you might use a separate pointer array to indirectly alter the order of elements in another array). Large and dynamic multi-dimensional arrays are typically allocated as a large array of pointers each of which points to a small array of data elements. Q.9) The elements of an array are stored successively in memory cells because^aEUR| A. by this way computer can keep track only the address of the first element and the addresses of other elements can be calculated B. the architecture of computer memory does not allow arrays to store other than serially C. both of above D. none of above ANSWER : by this way computer can keep track only the address of the first element and the addresses of other elements can be calculated SOLUTION : Page 2 Questions and Answers The elements of an array are stored successively in memory cells because by this way computer can keep track only the address of the first element and the addresses of other elements can be calculated. e. co m Q.10) Arrays are best data structures............ A. For relatively permanent collections of data. B. For the size of the structure and the data in the structure are constantly changi C. For both of above situation D. For none of the above in ANSWER : For the size of the structure and the data in the structure are constantly changi SOLUTION : The use of arrays may allow us to simplify our processing. We can use arrays to help read and analyze repetitive data with a minimum of coding. An array and a loop can make the program smaller. nl Q.11) Each array declaration need not give, implicitly or explicitly, the information about tio A. the name of array B. the data type of array C. the first data from the set to be stored D. the index set of the array w .a p ANSWER : the first data from the set to be stored SOLUTION : Each array declaration need not give, implicitly or explicitly, the information about the first data from the set to be stored. Q.12) Linear arrays are also called ................... w w A. Straight line array B. One-dimensional array C. Vertical array D. Horizontal array ANSWER : One-dimensional array SOLUTION : A Linear Array is a list of finite number of n homogeneous data elements i.e. the elements of same data types. A simple array may be created when the variables grouped together conceptually appear as a single row. This is known as a one-dimensional array. Page 3