what should I use when I want to copy src_str to dst_arr and why?
src_str
dst_arr
char dst_arr[10]; char *src_str = \"hello\";
P
strlcpy() is safer than strncpy() so you might as well use it. Systems that don't have it will often have a s_strncpy() that does the same thing.
strlcpy()
strncpy()
s_strncpy()
Note : you can't copy anything to dst_ptr until it points to something
dst_ptr