c语言中strcat函数_C和C ++中的strcat()函数教程及示例

c语言中strcat函数_C和C ++中的strcat()函数教程及示例_第1张图片

c语言中strcat函数

strcat() function is mainly used to copy or add string or char arrays in C and C++ programming languages. In general strcat() function will copy or add given string or char array into the destination string or char array.

strcat()函数主要用于以C和C ++编程语言复制或添加字符串或char数组。 通常,strcat()函数会将给定的字符串或char数组复制或添加到目标字符串或char数组中。

strcat()函数语法 (strcat() Function Syntax)

The strcat() function has the following syntax. The strcat() function is provided by <string.h> library or header.

strcat()函数具有以下语法。 strcat()函数由<string.h> 库或标头。

char *strcat(char *DESTINATION, const char *SOURCE);
  • `char *strcat` is the function where it will return a char pointer. This returns a pointer to the DESTINATION.

    char * strcat是函数,它将返回一个char指针。 这将返回一个指向DESTINATION的指针。
  • `char *DESTINATION`  is the character array or string where the SOURCE will be copied or added.

    “ char * DESTINATION”是将在其中复制或添加源的字符数组或字符串。
  • `const char *SOURCE` is the character array or string which will be copied or added into DESTINATION.

    const char * SOURCE是要复制或添加到DESTINATION中的字符数组或字符串。

使用strcat()函数复制字符串 (Copy String with strcat() Function)

We will start with a simple example where we will copy the character array str into the dst string. In this example, we will co

你可能感兴趣的:(字符串,指针,python,正则表达式,etl)