"Single versus Parallel Arrays" Please respond to the following:

History
Tutor: None Selected Time limit: 1 Day

Describe one (1) scenario not mentioned in the textbook in which the use of parallel arrays would be a plausible solution. Support your response with an example of the described use of the array.

Nov 16th, 2014

Parallel array structures are multiple arrays that act as one. Their elements are linked to each other to describe a particular concept. For example, parallel arrays could describe students. One array could hold students’ names. Another could hold their phone numbers. And one array could hold their grade-point averages. Here is an example:

arrNames[0] = “John Smith”;

arrPhoneNums[0] = “973-555-1212”;

arrGpas[0] = 3.55;

arrNames[1] = “Mary Todd”;

arrPhoneNums[1] = “201-555-1212”;

arrGpas[1] = 4.0

The above example shows the power of parallel arrays. They let you store multiple pieces of information for a particular subject. Since the parallel arrays are synchronized, you can use an index to easily recall all the data


Nov 16th, 2014

Are you studying on the go? Check out our FREE app and post questions on the fly!
Download on the
App Store
...
Nov 16th, 2014
...
Nov 16th, 2014
Dec 8th, 2016
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer