string str1 = "Hello"; string str2 = "hello"; if(str1.equalsIgnoreCase(str2)){ cout << "Both strings are equal ignoring case." << endl; } else{ cout << "Strings are not equal ignoring case." << endl; }
string str1 = "Good morning"; string str2 = "good afternoon"; if(str1.equalsIgnoreCase(str2)){ cout << "Both strings are equal ignoring case." << endl; } else{ cout << "Strings are not equal ignoring case." << endl; }Output: Strings are not equal ignoring case. This method is part of the standard C++ library, which is included in the