+ 1
Memcpy
Is it better to use memcpy for string copies as opposed to strcpy or strncpy? Does memcpy have the same flaw?
4 Respuestas
+ 1
Well, atleast I learned something. Thanks again Martin Taylor 🐨
0
I mean when one tries to copy a bigger c-string into a smaller destination string, strcpy throws no error, the behavior is just undefined. In terms of speed i don’t see a noticable difference.
https://code.sololearn.com/c2MyjO7kVt64/?ref=app