Strings in C | Q - 7

Last Updated :
Discuss
Comments

Which of the following will correctly compare two strings in C?


str1 == str2

strcmp(str1, str2) == 0

str1 = str2

str1.equals(str2)

Tags:
Share your thoughts in the comments