What is the difference between memcpy() and strcpy()? I tried to find it with the help of a program but both are giving the same output.
memcpy()
strcpy()
The main difference is that memcpy() always copies the exact number of bytes you specify; strcpy(), on the other hand, will copy until it reads a NUL (aka 0) byte, and then stop after that.