What is the difference between arrays and variables?
1
Expert's answer
2011-10-13T10:30:02-0400
A variable is a container for a single number. A variable can be thought of as a box, the number of items in the box determines the value of the box, and the type of items in the box must be uniform. An array is a collection of such boxes aligned together. The analogy is a medicine box that is specially designed so that it can only hold a specific type of medicine. Each partition in the box can contain any number of medicine (as long as the capacity permits), but you can only put in the medicine that the box is designed for. In an array, we use "index" to address each partition, an index is a number that uniquely identifies each partition in the medicine box.
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment