Here we’ll see how to delete an element of a particular position from an array. Deleting element means left-shifting the right elements starting from the position. The above program first takes the array as input and the position of an element to be deleted. Then it prints the array before and after deleting the element. … Continue reading “C Program to Delete Element from an Array”
Author: Srikanta
C Program to Insert an Element in an Array
Here we’ll see how to insert an element in an array at a particular position, after or before an existing element. If we insert an element in an array, all the elements, after the inserted position, need to be shifted to the next position. Inserting at a Particular Position We’ll start by inserting a new … Continue reading “C Program to Insert an Element in an Array”
Linux Commnad to Search String in Files
For developers, searching a string (text) in files is a everyday requirement. If you are using the Linux graphical user interfaces like GNOME ot KDE etc, then it is very easy and intutive. But Linux users use the commnad line interface (CLI) quite often. We’ll see how to use grep (Global Regular Expression Print) command … Continue reading “Linux Commnad to Search String in Files”
C Program to Reverse an Array
Here we’ll see how we can write a C program to reverse an array. If an array is ’43 23 45 11 8 54 89′, then after reversal it will become ’89 54 8 11 45 23 43′. We’ll start will a simple approach – will reverse the array with help of an another array. … Continue reading “C Program to Reverse an Array”
C Program to Check Whether Two Strings are Equal in Case Insensitive Way
In the previous article, we saw how to check whether two strings are equal. But there the comparision was case sensitive. That means, ‘QnAPlus’ and ‘qnaplus’ are not equal. Here we’ll see how we can compare strings in a case insensitive way. There is no library function in standard C to compare strings in case … Continue reading “C Program to Check Whether Two Strings are Equal in Case Insensitive Way”