It all has to do with memory alignment. strcmp does a byte compare if either of the arguments is not aligned to a word boundary. memcmp returns non-zero if either are unaligned; otherwise is does block compares (4 bytes at a time on a 32 bit architecture).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.