cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Difference between memcpy and strncpy
Difference between memcpy and strncpy
Oct 10, 2013 at 7:17am UTC
Rajkarthick
(18)
pls tell the difference between memcpy and strncpy.
Oct 10, 2013 at 7:34am UTC
rodiongork
(167)
Note that strncpy behaves almost like memcpy, but it also treats zero character (end of ASCII-Z string) specially, padding destination with zeroes after that point.
I.e. strncpy works like memcpy for data not containing zero byte.
http://www.cplusplus.com/reference/cstring/strncpy/
Topic archived. No new replies allowed.