C strcat function

« Previous

Synopsis:

Example

#include <stdio.h>
char *strcat(char *dest, const char *src); 

Description:

The strcat function concatenates or appends src to dest. All characters from src are copied including the terminating null character.

Return Value

The strcat function returns dest.

Example

Example

#include <stdio.h>
int main() {
  char string1[20];
  char string2[20];
  strcpy(string1, "Learn");
  strcpy(string2, "NewFile.oo");
  printf("Returned String : %s\n", strcat( string1, string2 ));
  printf("Concatenated String : %s\n", string1 );
  return 0;
}

Output Will Be :

Output

Returned String : NewFile.NewFile.oo
Concatenated String : NewFile.NewFile.oo


« Previous
Have Any Suggestion? We Are Waiting To Hear from YOU!

Your Query was successfully sent!