They both compare char for char, however memcmp takes the number of characters to compare, strcmp assumes the pointers passed to it are pointers to strings which zero terminators.
Generally use strcmp when comparing strings, this makes it clear what you are doing, use memcmp when you are comparing anything other than strings.
I would imagine that there was not much difference in efficiency but I might be wrong.
Comment