strncpycopy characters from stringsCalling Sequenceres = strncpy(str1, num)Argumentsstr1
a character string or matrix of character strings.
num
an integer or a matrix of integers, maximum number of characters to be copied from source.
res
a character string or matrix of character strings.
Descriptionres = strncpy(str1, num) copies the first num characters of source str1 to destination res.
num must have same dimensions than
str1 or num must be an integer number.
ExamplesSee Also
strcat
strcmp