C program to perform right rotation in array by 2 positions

C Program To Perform Right Rotation In Array By Two Positions

Performing right rotation in array means, our last element will become first element and shift each array elements towards right by one. Here we are going to perform right rotation by 2 times means we will shift each array element toward right two times. Our problem statement Suppose we have an array that has elements a={1,2,3,4,5}. … Read more

C Program to delete element from array at given index

C Program To Delete Element From Array At Given Index

In this tutorial, we are going to learn to write C Program to delete element from an array at the given index. To delete the element from the given index, we will iterate the array and to the given index. Now we will just shift each element towards the left one by one and decrease … Read more

C Program to delete given element from array

C Program To Delete Given Element From Array

In this tutorial, we are going to learn to write C Program to delete a given element from an array. To delete the given element we will compare the given element with the array elements. If we find a match then will delete the element from the array otherwise will check for the next array … Read more

C Program to delete element at end of Array

C Program To Insert Element At A Given Location In Array

To delete an element from the end in an array, we will just reduce the size of an array by one. After reducing the size we will print the array and will find that the last element is not printing. It means that the element is not in the array now. Introduction to Arrays in … Read more

C program to insert element at a given location in Array

C Program To Insert Element At A Given Location In Array

In this tutorial, we will learn to write C program to insert an element at the given location in an array. To insert an element at a given location first we have to go to that location and then shift each element towards the right. Or we can also do something like shifting the elements … Read more