In c++ how to use Safely using strncpy?

0 votes
88 views
asked Dec 20, 2013 in C++ by raj
Hi all

 In c++ how to use Safely using strncpy?

1 Answer

0 votes
answered Dec 20, 2013 by Oliv

when you use strncpy() always remember to add '\0' at the end of destination string. strncpy does not automatically add the terminator if the source string is longer than the destination!

...