Ask Question
3 December, 07:01

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.

+5
Answers (1)
  1. 3 December, 07:13
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers