Program List - 1D Arrays

  1. Input and print the array
  2. Count Array elements using sizeof() operator.
  3. Count array elements without using sizeof() operator.
  4. Count even and odd numbers in an array
  5. Count positive and negative numbers in an array
  6. Copy one array to another
  7. Find the sum of all the elements of the array
  8. Find the average height of 10 students
  9. Sum of negative and positive integers of the array
  10. Smallest and largest integer from the array
  11. Find the nearest lesser and nearest greater number in an array
  12. Find second largest element in an array
  13. Find second smallest element in an array
  14. Find two largest elements in an array
  15. Find two smallest elements in an array
  16. Largest difference between two array elements.
  17. Replace all even elements by 0 and odd by 1 in an array
  18. Add and subtract two arrays.
  19. Reverse the array without using another array
  20. Reverse the array using another array
  21. Find the first repeated element in an array
  22. Find number of occurrences of an element in an array
  23. Find frequency of each element in an array
  24. Count total number of duplicate elements in an array
  25. Print all duplicate elements in array
  26. Print all unique elements in an array
  27. Insert an element at specific position in an array
  28. Insert an element at appropriate position in a sorted array
  29. Delete first occurrence of the number from the array
  30. Delete all the occurrences of a particular number from the array
  31. Delete integer from particular position from the array
  32. Delete duplicate elements from an array
  33. Delete prime numbers from an array
  34. Count total number of elements divisible by a specific number in an array
  35. Create a new array from a given array with the elements divisible by a specific number
  36. Search an element in the array
  37. Sort the array in ascending order
  38. Sort the array in descending order
  39. Calculate median of the array
  40. Rotate the elements of an array in left
  41. Rotate the elements of an array in right
  42. Swap adjacent elements of an array
  43. Merge two arrays
  44. Divide an array into two arrays, one containing odd integers and another containing even integers
  45. Positive and negative numbers in two separate arrays
  46. Split the array from particular position
  47. Arrange all even numbers at top and all odd numbers at bottom of an array
  48. Sort even and odd elements separately in an array