string copy function cstrncpy in c

cstrncpy string copy function in c

To copy one string into another string cstrncpy() :

Function prototype:

int cstrcpy(char *dst,char *src);

cstrncpy function takes two string dst and str as input copies the data from src to dst and then returns 1 if both string is copied else returns zero id src is null;

cstrncpy string copy function  implementation in c :