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”

Delete N-th Node from End of a Linked List

In the previous article, we saw how to delete the N-th node of a linked list from the beginning of the list. Here we’ll see how to delete N-th node from the end. N starts with 0. Deleting 0-th node from end means deleting the last node. Logic to Delete the N-th Node from End … Continue reading “Delete N-th Node from End of a Linked List”

Delete N-th Node of a Linked List

Here we’ll see how to delete a node specified by its position (N-th node) from a linked list. N starts with 0. If N is 0, then delete the head node, if 1 then the second node and so on. Logic to Delete N-th Node from Linked List If head points to NULL, return. The … Continue reading “Delete N-th Node of a Linked List”

Execute User Defined Function before Main() in C++

In the previous article, we saw how to execute user defined function before main() in C. In C++ also we can use same mechanism to execute function before main. Here we’ll explore other options in C++. Execute Function before Main() By Creating Global Object Define a class. Call an user defined function from the class … Continue reading “Execute User Defined Function before Main() in C++”

0
0
0
0
0
0