Ask Question
21 May, 14:38

String member function compare compares two strings (or substrings) and returns 0 if:

A.

The strings are not equal

B.

the strings are equal

C.

if the first string is greater than the second

D.

All of the above.

+3
Answers (1)
  1. 21 May, 16:08
    0
    The correct answer for the given question is option (B). i. e the strings are equal.

    Explanation:

    String are the collection of characters. In the string compare function if both string are equal then it return 0 value otherwise it return non zero value.

    if string 1 is greater then the string 2 then it return 1. in c language

    if string 2 is greater then string 1 then it return - 1 in c language.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “String member function compare compares two strings (or substrings) and returns 0 if: A. The strings are not equal B. the strings are equal ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers