#include <string.h>
char *strncpy(char *p, const char *q, size_t n);
strncpy() copies at most the first n characters of string q to string p, overwriting p's previous contents. If q contains less than n characters, strncpy() appends a \0.
p
memcpy()
strcpy()