Program to swap maximum and minimum element of Array
Description To swap maximum and minimum numbers of an aaray, first find the position of maximum and minimum element. When position found then swap the element of that position. C/C++…
All Program Related To Array And Data Structure
Description To swap maximum and minimum numbers of an aaray, first find the position of maximum and minimum element. When position found then swap the element of that position. C/C++…
Description Merge of two array means copy the elements of first and second array into third array. Compare the corresponding elements of the both array, copy the element into third…
Description To delete element in a array sorted in ascending order, first find the position of that element. Then follow the normal process of element deletion. C/C++ /* C program…
Description * Deletion of element from an array is to remove element from exiting array. * To delete element at the end just decrement upper bound to 1. * If…
Description To insert element in an array sorted in ascending order, First compare the elements which is to be inserted(num) with every elements of array from start, if num is…
Description * An element can only be inserted if memory space allocated for array is still available. * To add number at the end just increment upper bound to 1…
Description To form number using entered digit, first declare a variable assign 0 to it. Next add to this variable by multiplying to 10th power of index of incoming number.…
Description To find second largest element, first find the largest element. To find largest element, first declare a smallest element. max = Integer.MIN_VALUE Compare each element with this. If element…
Description To find the smallest element of an array, Assume any element of array as smallest. Here assuming first element as smallest. Now compare every elements of array to first…
Description To find the average of elements present in the array, Calculate the sum of elements of array, divide the sum by total number of elements present in the array.…