what would be happen if we copy the size of source more than the size of the destination using memcpy function
unsigned short dst;
unsigned short source;
memcpy(dst, source, 1000);
memcpy starts writing to memory beyond the bounds of dest like nothing is wrong, which may or may not trigger a segmentation fault in response to the undefined behavior.
Why would you use memcpy in C++ anyway?
Originally Posted by Adak
Originally Posted by Salem