# Data Structure Questions and Answers-Parallel Array

## Data Structure Questions and Answers-Parallel Array

Congratulations - you have completed Data Structure Questions and Answers-Parallel Array.

You scored %%SCORE%% out of %%TOTAL%%.

Your performance has been rated as %%RATING%%

 Question 1 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER]
What are parallel arrays?
 A Arrays of the same size B Arrays allocated one after the other C Arrays of the same number of elements D Arrays allocated dynamically
NTA NET study material
Question 1 Explanation:
Different arrays can be of different data types but should contain same number of elements. Elements at corresponding index belong to a record.

 Question 2 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER]
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 firstName = ['Joe', 'Bob', 'Frank', 'Hans'] lastName = ['Smith', 'Seger'] heightInCM = [169, 158] for i in xrange(len(firstName)): print  C  firstName = ['Joe', 'Bob'] lastName = ['Smith', 'Seger', 'Sinatra', 'Schultze'] heightInCM = [169, 158] for i in xrange(len(firstName)): D None of the mentioned
Question 2 Explanation:
All the arrays must have equal length, that is, contain same number of elements.

 Question 3 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER]
 A When a language does not support records, parallel arrays can be used B Increased locality of reference C Ideal cache behavior D All of the mentioned
Question 3 Explanation:
In a record, if a field contains only 1 bit, extra space is needed to pad the bits, instead you can use parallel arrays to save space. Sequential access improves locality of reference and cache behavior.

 Question 4 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER]
What are some of the disadvantages of parallel arrays?
 A Poor locality of reference for non-sequential access B Very little direct language support C Expensive to shrink or grow D All of the mentioned
Question 4 Explanation:
They share the drawbacks of arrays.

 Question 5 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER]
What is a sorted array?
 A Arrays sorted in numerical order B Arrays sorted in alphabetical order C Elements of the array are placed at equally spaced addresses in the memory D All of the mentioned