arraypdf
arraypdf
Left:
Right:
2.Give c program to print the number of occurance of a number in an array
3.Sum and Product
4.Print square of the elements in an array
5.Difference between maximum and minimum element of an array
6.Count of array elements divisible by specific number
7.Sum the array after removing duplicate elements
8. Print negative elements in array
9.Print the peak elements in array
10.Print the count of positive numbers
11..Delete the element in the given position in an array
12.sum of duplicates in an array
\
32.Move all 0's
Given an integer array nums, move all 0's to the end of it while maintaining the
relative
order of the non-zero elements.Note :that you must do this in-place without making
a
copy of the array.
TEST CASE 1:
Input: nums = [0,1,0,3,12]
Output: [1,3,12,0,0]
TEST CASE 2:
Input: nums = [0]
Output: [0]
TEST CASE 3:
Input: nums = [0,1]
Output: [1,0]
33.Delete the Element from Array
Write a program to delete elements from the array at specified position. How to
remove
elements from an array at a given position. Logic to remove elements from any given
position in an array. The program should also print an error message if the delete
position
40.Write a program to read elements in a matrix and check whether the given matrix
isa symmetric matrix or not.A matrix is considered a symmetric matrix if it is equal to
its transpose, i.e., A = A^T. Inother words, a square matrix is symmetric if the
elements across the main diagonal areequal.
TEST CASE 1:
Input:
Enter the number of rows: 3
Enter the number of columns: 3
Enter element [0][0]: 1
Enter element [0][1]: 2
Enter element [0][2]: 3
Enter element [1][0]: 2
Enter element [1][1]: 4
Enter element [1][2]: 5
Enter element [2][0]: 3
Enter element [2][1]: 5
Enter element [2][2]: 6