bcmp 

Compares two memory blocks

#include <memory.h>
long bcmp (
        char *b1,
        char *b2,
        long n
)

Arguments

b1 Pointer to memory block 1
b2 Pointer to memory block 2
n Number of bytes to compare

Explanation

The first n bytes of the memory blocks pointed to by b1 and b2 are compared and the result is indicated in the return value.

Return Value

The result of the comparison is indicated in the return value as shown below:

Result Return Value
b1<b2 <0
b1=b2 =0
b1>b2 >0

See Also

memcmp()