C Program String Concatenation using strcat

By | March 12, 2020

C Program String Concatenation using strcat

C program to input two strings 
and concatenating the second string at 
end of first string using strcat()
predefined string function.

#include <stdio.h>
#include <string.h>
int main()
  char str1[100], str2[100];

  printf("Enter the first string\n");

  printf("Enter the second string\n");

  strcat(str1, str2);

  printf("String obtained after concatenation\nusing strcat() function is: %s\n", str1);

  return 0;


Enter the first string
Enter the second string
101 Important C Programs
String obtained after concatenation
using strcat() function is: easycodebook.com 101 Important C Programs



Leave a Reply

Your email address will not be published. Required fields are marked *