__Definition__

Array (from programmer’s view) - “**a** **consecutive set of memory locations**” or in details, **Array** is** - **

- A
**linear data structure**. - A contiguous allocated memory for the
**homogeneous data type**. - An
**ADT**is a set of pairs, <**index**,**value**>, such that each index is defined as a value associated with it (correspondence or mapping in mathematical terms).

So, being an **ADT** we will be more concerned with the operations that can be performed on an array. The array is useful for storing thousands of values in it and we access the values through the index. Usually, arrays are of fixed size.

__Need of using Array__

The efficiency of a computer lies in processing tens of thousands of data within a blink of an eye. Though we often start our programming journey with small example programs like -

Find minimum or maximum from given any two or three values.

Swap two values etc.

Having two or three variables may suffice in the above cases but for a large number of values, it is simply not possible. Arrays serve this purpose efficiently.

__Types of Arrays__

We can **categorize**** into two** -

**One-dimensional array** – sequence of **finite homogeneous elements.**

**Multi-dimensional array** – each element is an array of elements of a similar type. Here we discuss only two and three-dimensional arrays**.**

__Properties of an array__

__One-dimensional array__

- Arrays are contiguous memory locations of homogeneous elements denoted by arrayName[lower bound L, upper bound U] or arrayName[size](like in C++ or in Java). size = number of elements array named arrayName can hold and lower bound is 0 and upper bound is (size - 1) in case of programming implementation but theoretically lower bound can vary and so is upper bound to maintain the constraint upper bound – lower bound + 1 = size
- Each value stored in an array is called an array element.

**In this site, we are providing some standard array programs. For any demand of new program please mail us. **

**Enjoy all programs related to array:**

**1. **__Find Maximum and Minimum from an array__

**2. **__Kth Largest and Smallest Element__

**3. **__2nd largest element from the array__

**4. **__Find how many negative numbers are present in the array__

**5. **__The elements of one array are copied to another array__

**6. **__Delete ____an ____element from any position in array__

**7. **__Frequency of each element in the Array__

**8. **__Find out the unique elements from the Array__

**9. **__Finds odd and even elements from the array and stored in two separate arrays__

**10. **__Counts the number of odd and even elements separately from the array__** **

**11. **__Reverses the elements of an Array__

**12. **__Marge two Array and ____store____ in the third Array__

**15. **__Sorted the array and then separate even and odd elements in different array__

**16. **__Sort ____the ____number of strings in an array__

**17. **__Check one given element of an array present more than n/2 times or not__

**18. **__The sum of the elements of ____an____ Array is calculated using a pointer__