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

Array Exercises (Assignment5)

This document lists 8 exercises for practicing working with 1D and 2D arrays in C, including programs to find the sum and largest/smallest elements of arrays and matrices, multiply matrices, reverse strings, and find sums and max/min of rows and columns in 2D arrays.

Uploaded by

Iam Bunny
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

Array Exercises (Assignment5)

This document lists 8 exercises for practicing working with 1D and 2D arrays in C, including programs to find the sum and largest/smallest elements of arrays and matrices, multiply matrices, reverse strings, and find sums and max/min of rows and columns in 2D arrays.

Uploaded by

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

here are some exercises you can try to practice working with 1D

and 2D arrays in C:
1. Write a program that takes input from the user for an array of
integers and finds the sum of all the elements in the array.
2. Write a program that takes input from the user for an array of
integers and finds the largest and smallest elements in the array.
3. Write a program that takes input from the user for two matrices and
calculates their multiplication. Print the resulting matrix.
4. Write a program that takes input from the user for a matrix of
integers and finds the sum of all the elements in the matrix.
5. Write a program that takes input from the user for a matrix of
integers and finds the largest and smallest elements in the matrix.
6. Write a program that takes input from the user for a string of
characters and stores it in an array of characters. Then, print the
reverse of the string.
7. Write a program that takes input from the user for a 2D array of
integers and finds the sum of all the elements in each row and each
column. Print the results.
8. Write a program that takes input from the user for a 2D array of
integers and finds the largest and smallest elements in each row and
each column. Print the results.

You might also like