What is the value returned by the function CompareTo() if the invoking string is less than the string compared?

a) zero
b) value less than zero
c) value greater than zero
d) none of the mentioned

1 thought on “ What is the value returned by the function CompareTo() if the invoking string is less than the string compared?”

  1. b
    Explanation: CompareTo() function returns zero when both the strings are equal, it returns a value less than zero if the invoking string is less than the other string being compared and value greater than zero when invoking string is greater than the string compared to.

Leave a Comment