C Language Archive
Arrays: Using primitive variables, we can store only 1 value at a time Existing value will be replaced when we assign new value. For example, In Banking application, if we want to store 100 mobile …
Sum all array elements: Display even elements count in the array:
Largest element in the array: Consider the first element of array as largest element initially. Continue compare with all other elements in the array from second location. If we found an element which is larger …
Swapping 2 Numbers: Interchanging the values of 2 variables is called swapping. We can swap the data in many ways Following examples showing in 2 ways One is using temporary variable Another one is without …
Passing array as parameter to function: Array variable stores base address of memory block. Passing array is nothing but, passing the address of array to the function. Duplicate array will not be created in the …
How can we insert an element into array? To insert the element into specific location, we must shift all other elements by 1 location towards right side. We use loop for shifting multiple elements. We …
Insert an array into another array at specified location:
Linear Search: One of searching algorithms to find an element in array. Linear search can apply on random array also. In linear search, every time index element compare with the element to be searched. If …
Merge arrays: Read 2 array of elements Adding all elements of one array at the end of second array is called merging We can also call it as concatenation of two arrays.
Swapping elements in specified locations: