Menu

Arrays Questions

MCQ
101.
How will you implement dynamic arrays in Java?
forum Discussion
MCQ
102.
Which of the following is the correct syntax to declare an ArrayList in Java?
forum Discussion
MCQ
103.
In what type of dynamic array do you divide the array into two parts?
forum Discussion
MCQ
104.
What are the advantages of dynamic arrays?
forum Discussion
MCQ
105.
What is the time complexity for inserting/deleting at the beginning of the array?
forum Discussion
MCQ
106.
What are parallel arrays?
forum Discussion
MCQ
107.
Which of the following can be called a parallel array implementation?

a)

   firstName  = ['Joe','Bob','Frank','Hans']
   lastName   = ['Smith','Seger','Sinatra','Schultze']
   heightInCM = [169,158,201,199]
 
   for i in xrange(len(firstName)):
       print "Name:",firstName[i], lastName[i]
       print "Height in CM:,",heightInCM[i]

b)

   firstName  = ['Joe','Bob','Frank','Hans']
   lastName   = ['Smith','Seger']
   heightInCM = [169,158]
 
   for i in xrange(len(firstName)):
       print "Name:",firstName[i], lastName[i]
       print "Height in CM:,",heightInCM[i]

c)

   firstName  = ['Joe','Bob']
   lastName   = ['Smith','Seger','Sinatra','Schultze']
   heightInCM = [169,158]
 
   for i in xrange(len(firstName)):
       print "Name:",firstName[i], lastName[i]
       print "Height in CM:,",heightInCM[i]

d) None of the mentioned
forum Discussion
MCQ
108.
What are the advantages of parallel arrays over the traditional arrays?
forum Discussion
MCQ
109.
What are some of the disadvantages of parallel arrays?
forum Discussion
MCQ
110.
What is a sorted array?
forum Discussion