Computer Science, asked by pragyanshree1298, 1 year ago

What is the difference between strcat() and strcpy() functions?

Answers

Answered by harvvii
3
Hey friend
strcat()  –   This function is used to con concatenate two strings.
strcpy() – This function  is used to copy the second string given as second parameter to this function into first string.

Answered by smartbrainz
15

Difference between strcat() and strcpy() functions:

The 'strcat()' is a function used for appending one string content with another string element. The strcat() function returns a pointer to the destination where the concatenated resulting string resides.

The strcpy() function is used to copy strings. The 'strcpy()' function copies a string pointed as a source into the destination. This function accepts two arguments of type pointer to char or array of characters and returns a pointer to the destination.

Similar questions