Home / C Programming / Arrays :: Discussion

Discussion :: Arrays

  1. If the two strings are identical, then strcmp() function returns

  2. A.

     1

    B.

     0

    C.

     -1

    D.

     true

    E.

     None of these

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    Declaration: strcmp(const char *s1, const char*s2);

    The strcmp return an int value that is
    if s1 < s2 returns a value < 0
    if s1 == s2 returns 0
    if s1 > s2 returns a value > 0


Be The First To Comment