strcmp和strncmp有什麼差別呢?
前者比較全部;
後者比較字元串前n個字元。

記憶方法:
strncmp--Binary safe string comparison of the first n characters.
str--string
n--字元串的第n個
cmp--comparison
strcmp和strncmp有什麼差別呢?
前者比較全部;
後者比較字元串前n個字元。
記憶方法:
strncmp--Binary safe string comparison of the first n characters.
str--string
n--字元串的第n個
cmp--comparison