/* * strncpy.c * * Copy one string to another. * Correctly terminate the new string and do not exceed its bounds. */ #include /* Copy src into dst; return the number of characters copied */ int strncpy(char dst[], const char src[], int dst_size) { int i; for (i=0; i