memcmp.memset.sprintf 的用法 和 意思

来源:百度知道 编辑:UC知道 时间:2024/06/03 19:34:01
memcmp.memset.sprintf 的用法 和 意思

memcmp
Compare characters in two buffers.
比较两块内存中的字符

memset
Sets buffers to a specified character
将内存块设置为指定的字符

sprintf
Write formatted data to a string
将格式化的数据写到字符串

memcmp
Compare characters in two buffers.

int memcmp( const void *buf1, const void *buf2, size_t count );

Routine Required Header Compatibility
memcmp <memory.h> or <string.h> ANSI, Win 95, Win NT

For additional compatibility information, see Compatibility in the Introduction.

Libraries

LIBC.LIB Single thread static library, retail version
LIBCMT.LIB Multithread static library, retail version
MSVCRT.LIB Import library for MSVCRT.DLL, retail version

Return Value

The return value indicates the relationship between the buffers.

Return Value Relationship of First count Bytes of buf1 and buf2
< 0 buf1 less than buf2
0 buf1 ide