The document lists 51 programming tasks in C related to arrays and matrices. These tasks include operations such as storing, reversing, summing, copying, sorting, merging, and manipulating arrays, as well as performing matrix operations like addition, subtraction, and finding determinants. The tasks are designed to enhance understanding of array and matrix handling in C programming.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
16 views3 pages
ARR1
The document lists 51 programming tasks in C related to arrays and matrices. These tasks include operations such as storing, reversing, summing, copying, sorting, merging, and manipulating arrays, as well as performing matrix operations like addition, subtraction, and finding determinants. The tasks are designed to enhance understanding of array and matrix handling in C programming.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3
C Array Questions
1. Write a program in C to store elements in an array and print it.
2. Write a program in C to read n number of values in an array and display it in reverse order. 3. Write a program in C to find the sum of all elements of the array. 4. Write a program in C to copy the elements of one array into another array 5. Write a program in C to count a total number of duplicate elements in an array. 6. Write a program in C to print all unique elements in an array. 7. Write a program in C to merge two arrays of same size sorted in decending order. 8. Write a program in C to count the frequency of each element of an array. 9. Write a program in C to find the maximum and minimum element in an array. 10. Write a program in C to separate odd and even integers in separate arrays. 11. Write a program in C to sort elements of array in ascending order. 12. Write a program in C to sort elements of the array in descending order. 13. Write a program in C to insert New value in the array (sorted list ).. 14. Write a program in C to insert New value in the array (unsorted list ). 15. Write a program in C to delete an element at desired position from an array. 16. Write a program in C to find the second largest element in an array. 17. Write a program in C to find the second smallest element in an array. 18. Write a program in C for a 2D array of size 3x3 and print the matrix. 19. Write a program in C for addition of two Matrices of same size. 20. Write a program in C for subtraction of two Matrices. 21. Write a program in C for multiplication of two square Matrices. 22. Write a program in C to find transpose of a given matrix. 23. Write a program in C to find sum of right diagonals of a matrix 24. Write a program in C to find the sum of left diagonals of a matrix. 25. Write a program in C to find sum of rows an columns of a Matrix. 26. Write a program in C to print or display the lower triangular of a given matrix. 27. Write a program in C to print or display upper triangular matrix. 28. Write a program in C to calculate determinant of a 3 x 3 matrix. 29. Write a program in C to accept a matrix and determine whether it is a sparse matrix. 30. Write a program in C to accept two matrices and check whether they are equal. 31. Write a program in C to check whether a given matrix is an identity matrix. 32. Write a program in C to find a pair with given sum in the array. 33. Write a program in C to find the majority element of an array. A majority element in an array A[] of size n is an element that appears more than n/2 times (and hence there is at most one such element). 34. Write a program in C to find the number occurring odd number of times in an array. 35. Write a program in C to find the largest sum of contiguous subarray of an array. 36. Write a program in C to find the missing number from a given array. There are no duplicates in the list 37. Write a program in C to find the pivot element of a sorted and rotated array using binary search. 38. Write a program in C to merge one sorted array into another sorted array. 39. Write a program in C to rotate an array by N positions. 40. Write a program in C to find the ceiling in a sorted array. N.B.: Given a sorted array in ascending order and a value x, the ceiling of x is the smallest element in array greater than or equal to x, and the floor is the greatest element smaller than or equal to x. 41. Write a program in C to find the Floor and Ceil of the number 0 to 10 from a sroted array. 42. Write a program in C to find the smallest missing element from a sorted array. 43. Write a program in C to to print next greater elements in a given unsorted array. Elements for which no greater element exist, consider next greater element as -1. 44. Write a program in C to find the two repeating elements in a given array. 45. Write a program in C to find two elements whose sum is closest to zero. 46. Write a program in C to find the smallest positive number missing from an unsorted array. 47. Write a program in C to find a subarray with given sum from the given array. 48. Write a program in C to find if a given integer x appears more than n/2 times in a sorted array of n integers. 49. Write a program in C to find majority element of an array. 50. Write a program in C to print a matrix in spiral form 51. Write a program in C to find the maximum circular subarray sum of a given array.