Array Exercises (Assignment5)
Array Exercises (Assignment5)
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.