I know that the compare method will return an integer value denoting something like the difference between the two strings (or 0 if matched). My question is, in the case the a mismatch is found, does it stop comparing at the mismatch or it finishes until it was specified?
Does it depends on the compiler or is it standard? I am currently using gcc 4.1.2
Well, the standard doesn’t care, but the result of the compare — the standard only cares about that — is entirely dependent on the first non-matching character. So comparing the others would be rather pointless for any implemention, except possibly a few more characters if it’s easier to handle wrt to caches or word sizes of the platform.