What is Array?

In this topic, you will learn about, What is Array?

Array: An array is a collection of elements described by a single name. Elements of an array are referenced by a subscript value also called index value. The index value is used within pair of brackets after the name of the array variable to refer to an element of the array. Arrays are categorized into two types depending on the number of subscripts used with array name, they are:

  • One dimensional or linear array
  • Multidimensional array
  1. One dimensional or Linear array: One dimensional or linear array is a list of a finite number of N homogeneous data elements such that
    1. The elements of the array referenced by an index set consisting of N consecutive integer numbers.
    2. The elements of the array are stored in consecutive memory locations.

Operations on an array:

  • Creation.
  • Traversal:
    • in order
    • reverse order
  • Insertion:
    • at beginning
    • at end
    • at given position
    • after given element
    • before given element
    • in sorted array
  • Deletion:
    • from beginning
    • from end
    • from given position
      • from all occurrences
      • from the first occurrence/once
    • after given element
    • before given element
    • duplicate elements
  • Searching:
    • Sequential Search
    • Advanced Sequential Search
    • Binary Search
      • Iterative
      • Recursive
  • Sorting:
    • Bubble Sort and Modified Bubble Sort
    • Selection Sort
    • Insertion Sort
    • Quick Sort
    • Merge Sort
    • Heap Sort
  • Merging/ Concatenation:
    • Merging
    • Concatenation

Also read: Data Structure

Also Read: Top 10 best books to learn C Programming

Comment below if you have queries related to the above topic, What is Array?

See also  c program to language to read 2 no of an input and sum