C Programs - Array


An array is a collection of elements of similar data type stored at the contiguous memory location.

Array elements can be accessed using an index.
Array index starts from 0 to N-1 (where N is the size of array).

Arrays can be categorized into two categories:

  1. One-dimensional array
  2. Multi-dimensional array

List of programs

  1. C Program to read and print elements of array
  2. C Program to print sum of array elements
  3. C Program to print maximum and minimum element in array
  4. C Program to print second largest element in array
  5. C Program to print count of even and odd numbers in array
  6. C Program to count positive, negative and zero numbers in array
  7. C Program to copy all array elements from one array to another
  8. C Program to insert an element in array
  9. C Program to delete an element from array
  10. C Program to print frequency of each element in array
  11. C program to print all unique elements in the array
  12. C Program to count total number of duplicate elements in an array
  13. C Program to print duplicate elements in an array
  14. C program to delete all duplicate elements from an array
  15. C program to merge two array to third array
  16. C program to find reverse of an array
  17. C program to search an element in an array
  18. C program to sort array
  19. C program to left rotate an array
  20. C program to right rotate an array
  21. C program to add two matrices
  22. C program to perform scalar matrix multiplication
  23. C Program to multiply two matrices