#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, a '\0' is appended.
p
memcpy() and memmove() and
strcpy()