Hacker Newsnew | past | comments | ask | show | jobs | submitlogin



strcmp's return value is loosely defined because some implementations return the difference between the characters in the string to avoid some conditional checks or jumps. Something like:

  int d = a[i] - b[i];
  if (d == 0) return d;




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: