Data Structure Questions and Answers-Parallel Array

BUY PDF <<CLICK HERE>>

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%%


Your answers are highlighted below.
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
Latest Current affairs Questions answers
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]
What are the advantages of parallel arrays over the traditional arrays?
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
Bank exam Questions answers
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
Bank exam Questions answers
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
GK (GENERAL KNOWLEDGE) Questions answers
Question 5 Explanation: 
The array can be sorted in any way, numerical, alphabetical or any other way but the elements are placed at equally spaced addresses.

Once you are finished, click the button below. Any items you have not completed will be marked incorrect. Get Results
There are 5 questions to complete.

BUY PDF <<CLICK HERE>>