strcpy (C) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

strcpy (C)

Is strcpy the standard function for assigning strings a new value (in C)? Or is there any other better method? Thank you.

15th Oct 2019, 10:18 PM
Eduardo Franco
Eduardo Franco - avatar
1 Answer
+ 1
strcpy is the standard function, and it only copy string2 to string1, strcpy_s was introduced to reduce buffer overflow which i don't think is part of the standard yet, so basically strcpy is the standard
16th Oct 2019, 3:56 AM
✳AsterisK✳
✳AsterisK✳ - avatar