If I send memcmp
two pointers to integers, then it seems to interpret the integers as chars.
For example:
int a = 5;
int b = 256;
int res = memcmp(&a,&b,sizeof(int));
In the code above, it returns 1.
I'd like to get a better understanding of this function, and I am wondering if I'm either using it wrong or if there is a similar function for comparing blocks of memory holding int
values.