string compare function in c programming language that has 3 outputs

Posted by Roshan on Stack Overflow See other posts from Stack Overflow or by Roshan
Published on 2010-05-02T10:55:01Z Indexed on 2010/05/02 10:57 UTC
Read the original article Hit count: 307

Write your own version of the strcmp function string_compare. Supply a main program that will test each of the 3 differing outcomes.

int string_compare(char *s, char *t);

returns

<0  if s is lexically before t
0   if s is identical to t
>0  if s is lexically after t

© Stack Overflow or respective owner

Related posts about c

    Related posts about programming-languages