answersLogoWhite

0

What is the use of Arrays?

Updated: 8/17/2019
User Avatar

Wiki User

8y ago

Best Answer

Arrays are a primitive container for data of the same type. The elements of an array are stored in a block of contiguous memory, one after the other. As such, an array offers the most compact method of storing a collection of values. Unlike ordinary variables, which can be named, the elements of an array are anonymous; we can only refer to them by their memory address. However, given that each element is the same type and therefore the same length (in bytes), it is trivial to calculate the address of any element within the array knowing only the start address of the array (which can be named) and the zero-based index of the element we wish to access, such that the first element resides at index 0. Since calculating individual addresses is a constant-time operation, this makes it possible to perform constant-time random-access to any element in the array. However, the array suffix operator means we do not need to manually calculate individual addresses, we need only know the zero-based index of the element we wish to access.

User Avatar

Wiki User

8y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

13y ago

Array is nothing but data holder

data holder mean variable

in array we have to hold multiple values which has same data type

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the use of Arrays?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Name two smaller arrays you can use to find the product of 8x6?

name two smaller arrays you can use to find the product


Why do you use antenna arrays?

To improve the signal :)


How can you use arrays to determine if a number prime or composite?

Yes


How do you use arrays and expanded algorithm like 29x47?

1363


Dynamically allocated array waste storage and time?

It's actually not true. In order to make a good program which can work with big arrays you have to use dynamic arrays because you can cleam memory used by dymanic arrays any time. For static arrays is not true, memery which was reserved for static arrays will be available for other applications only when you finish working with your application (which is working with static arrays).


How do you use arrays in unix?

Unix itself does not use arrays. However, some shell scripting languages such as bash or ksh have simple rudimentary uses of a singly dimensioned array. If you want anything multi-dimensional or special use such as associative arrays, then you need a scripting language such as perl, or awk or python, etc.


Why do you use ampersand symbol for arrays and not for a string?

You don't need to use ampersand for arrays; it's entirely optional even for strings (character arrays). This is because arrays will implicitly convert to a pointer at the slightest provocation. Thus for an array named X, you can either pass the array to a function as X, &X or &X[0], they all refer to the exact same address.


What data structure does python use in place of arrays?

I believe Python's version of arrays is called dictionaries, although I am not completely sure and will have to check now...


How you can multiply 3x24 by using arrays?

Sir, your question is not clear. If you just want to multiply 3 and 24 then why are you trying to use arrays for such simple calculation.


What is a multidimentional array?

Arrays having more than one dimension is known as multi-dimensional arrays. Multi-dimensional arrays is also known as arrays-of-arrays.


What is multidimentional array?

Arrays having more than one dimension is known as multi-dimensional arrays. Multi-dimensional arrays is also known as arrays-of-arrays.


Is it possible to use arrays when using the java programming language?

It is possible to use arrays when employing java programming language. There are many different series of programming choice that can be employed with various end results.