Page 347 - Cs_withBlue_J_C11_Flipbook
P. 347

Let’s Revisit



                      ♦ Arrays can be defined as a set of variables which contains values of same data types having same variable name but different
                     subscripts required to separate the values.
                      ♦ Two or more elements arranged row-wise containing separate subscript values indicating the position of the element is known
                     as single dimensional array or 1D array.
                      ♦ The total number of elements an array holds is the length of the array.
                      ♦ Searching is used to determine whether an element is present in the array or not.

                      ♦ Sorting is the process of arranging the elements either in the ascending or the descending order.
                      ♦ Insertion is the process of adding an element at any desired position in the array.
                      ♦ Deletion is the process of deleting or removing an element from the array from the given position.
                      ♦ Merging is the process of combining two or more than two arrays.








                                                              MIND DRILL






                      Solved Questions



                 A.  Tick ( ) the correct answer:
                    1.  To deal with multiple data together, we use the concept of ………………… .
                       a.  Loops                                       b.  Arrays
                       c.  Strings                                     d.  None of these
                    2.  When two or more elements, arranged row-wise, contain separate subscript values indicating the position of each element, then
                       it is known as ………………… .
                       a.  Single-dimensional Array                    b.  Double-dimensional array
                       c.  String                                      d.  None of these
                    3.  Which of the following is an example of a static declaration of an array?
                       a.  int ar={2,3,4,5,6};                         b.  String ar[ ] = {"India", KOlkata", New Delhi");
                       c.  char ch={'a','2',':', '4'};                 d.  All of the above
                    4.  What do you need while inputting data in an array from the user?
                       a.  InputStreamReader                           b.  Scanner class
                       c.  Both a and b                                d.  None of these
                    5.  Which of the following properties is used to find the length of an array?
                       a.  len                                         b.  length
                       c.  length()                                    d.  None of these
                    6.  "It is used to determine whether an element is present in the array or not." What is the given statement referring to?
                       a.  Merging                                     b.  Insertion
                       c.  Searching                                   d.  None of these
                    7.  Which type of searching technique requires the sorted data?
                       a.  Binary search                               b.  Linear search
                       c.  Both a and b                                d.  None of these





                                                                                                                       345
                                                                                                              Arrays   345
   342   343   344   345   346   347   348   349   350   351   352