0% found this document useful (0 votes)
4 views2 pages

Extra Array Operations

The document outlines a series of practice questions focused on single dimensional arrays in programming. It includes tasks related to creation, initialization, traversal, insertion, deletion, searching, updating, sorting, merging, copying, reversing, counting elements, and finding minimum and maximum values, as well as calculating the sum and average of elements. Each task is designed to help users gain practical experience with array manipulation.

Uploaded by

milianand0307
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Extra Array Operations

The document outlines a series of practice questions focused on single dimensional arrays in programming. It includes tasks related to creation, initialization, traversal, insertion, deletion, searching, updating, sorting, merging, copying, reversing, counting elements, and finding minimum and maximum values, as well as calculating the sum and average of elements. Each task is designed to help users gain practical experience with array manipulation.

Uploaded by

milianand0307
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Single Dimensional Array – Practice Questions

1. Creation / Declaration
Write a program to declare a single dimensional array of size N to store
integer elements.

2. Initialization
Write a program to initialize a one-dimensional array with N values
entered by the user.

3. Traversal (Accessing elements)


Write a program to traverse a single dimensional array and display all
its elements.

4. Insertion
Write a program to insert a new element at a given position in a single
dimensional array.

5. Deletion
Write a program to delete an element from a specified position in a
single dimensional array.

6. Searching
Write a program to search for a given element in a single dimensional
array and display its position if found.

7. Updating / Modification
Write a program to update the value of an element at a specified index
in a single dimensional array.

8. Sorting
Write a program to sort the elements of a single dimensional array in
ascending order.

9. Merging
Write a program to merge two single dimensional arrays into a third
array.

10. Copying
Write a program to copy all elements of one single dimensional array
into another array.

11. Reversing
Write a program to reverse the elements of a single dimensional array.
12. Counting Elements
Write a program to count the total number of elements present in a
single dimensional array.

13. Finding Minimum


Write a program to find the minimum element in a single dimensional
array.

14. Finding Maximum


Write a program to find the maximum element in a single dimensional
array.

15. Sum of Elements


Write a program to calculate the sum of all elements of a single
dimensional array.

16. Average of Elements


Write a program to calculate the average of the elements in a single
dimensional array.

You might also like