0% found this document useful (0 votes)
2 views

array_task

The document outlines a series of programming tasks for C language focusing on array manipulation. Tasks include initializing and printing arrays, finding largest and smallest elements, calculating sums and averages, checking for number presence, and counting even and odd numbers. It also covers operations on 2D arrays such as initialization, matrix multiplication, and summing elements and diagonals.

Uploaded by

hinalpatel.8182
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

array_task

The document outlines a series of programming tasks for C language focusing on array manipulation. Tasks include initializing and printing arrays, finding largest and smallest elements, calculating sums and averages, checking for number presence, and counting even and odd numbers. It also covers operations on 2D arrays such as initialization, matrix multiplication, and summing elements and diagonals.

Uploaded by

hinalpatel.8182
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Faculty of Engineering and Technology

Array Task

1. Write a C program to declare an array of integers and initialize it with values from 1 to 10. Print all the
elements of the array.
2. Write a program to find the largest and smallest elements in an array.
3. Create a C program to calculate the sum and average of all elements in an array.
4. Create a program to check whether a given number is present in an array.
5. Write a program to count the total number of even and odd numbers in an array.

6. Write a program to declare a 2D array of size 3x3 and initialize it with values. Print the array elements in
matrix form.

7. Create a C program to implement a matrix multiplication using 2D arrays.

8. Write a program to count how many elements in a 1D array are positive, negative, and zero.

9. Write a program to find the sum of the elements of a 2D array.

10. Write a program to find the sum of the diagonal elements of a 2D array. (3*3)

You might also like