Given two strings, the task is to check if these two strings are identical(same) or not.
Input: string1 = “GeeksforGeeks”, string2 = “GeeksforGeeks”
Input: string1 = “GeeksforGeeks”, string2 = “Geeks”
Approach: This can be done with the help of strcmp() method in C. Please note, this method is case-sensitive.
Enter the first string: GeeksForGeeks Enter the second string: GeeksForGeeks Are both strings same: Yes
- A Program to check if strings are rotations of each other or not
- Meta Strings (Check if two strings can become same after a swap in one string)
- Check if strings are rotations of each other or not | Set 2
- Check if two strings are permutation of each other
- Check if two given strings are isomorphic to each other
- Check whether two strings are anagram of each other
- Check whether Strings are k distance apart or not
- Check if two strings are k-anagrams or not
- Check whether a given string is an interleaving of two other given strings
- Check if there is any common character in two given strings
- Check if edit distance between two strings is one
- Check if two strings have a common substring
- Check if all the palindromic sub-strings are of odd length
- Given two strings check which string makes a palindrome first
- Check if given string can be split into four distinct strings
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : Ryuga