0% found this document useful (0 votes)
8 views1 page

1D and 2D Array Programming Tasks

The document outlines a series of programming tasks involving 1D and 2D arrays. It includes operations such as input/output, finding maximum and minimum values, calculating sums and averages, sorting, and matrix operations. Each task is designed to enhance understanding of array manipulation and pointer arithmetic.

Uploaded by

tanzilijaz3
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)
8 views1 page

1D and 2D Array Programming Tasks

The document outlines a series of programming tasks involving 1D and 2D arrays. It includes operations such as input/output, finding maximum and minimum values, calculating sums and averages, sorting, and matrix operations. Each task is designed to enhance understanding of array manipulation and pointer arithmetic.

Uploaded by

tanzilijaz3
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

1.

Write a program that:

 Declares a 1D integer array of size 10


 Takes input from the user
 Displays all elements

2. Write a program to:

 Store 5 numbers in a 1D array

3. Find and display the maximum and minimum values.


4. Write a program that:

 Stores N numbers in a 1D array

5. Calculates and displays the sum and average.


6. Find the largest element of an array using pointer arithmetic.
7. Display array elements in reverse order using pointer.
8. Count even and odd numbers in an array using pointer.
9. Write a program that:

 Copies elements of one 1D array into another array

10. Write a program to:

 Sort the elements of a 1D array in ascending order.

11. Write a program that:

 Declares a 2D array (3×3 matrix)


 Takes input from the user

12. Displays the matrix in matrix form.


13. Write a program to:

 Store values in a 2D array


 Calculate the sum of all elements

14. Write a program that:


Calculates and displays the sum of each row of a 2D array

15. Write a program that:

 Calculates and displays the sum of each column of a 2D array

16. Write a program to:

 Add two matrices of same size


 Store the result in a third matrix.

You might also like