strncpy

Copies a character string

#include <strings.h>
char *strncpy (
        char *dest,
        const char *src,
        size_t n
)

Arguments

dest Pointer to destination memory area
src Pointer to source character string
n Number of bytes to copy

Return Value

dest, a pointer to the destination string is returned.

Explanation

n bytes of the string pointed to by src are copied to the memory area pointed to by dest.