C Program to Delete Element from an Array

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”

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”

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”

C Program to Check Whether Two String are Equal

Here we’ll see how to check whether two strings are equal. C string (string.h) library already provides a function to do that. Using strcmp() Take two strings as input (say, s1 and s2). Call strcmp() with two input strings. If strcmp() returns 0, the strings are equal, otherwise, not. Here is the output of the … Continue reading “C Program to Check Whether Two String are Equal”

0
0
0
0
7
0