C program to String Concatenation with stcat() Function

In this C program, We will see “How to do String Concatenation with stcat() Function ” . So, let’s do it …

//String Concatenation means String Addition with the second string (after first String).
#include<stdio.h>
int main()
{
  char Str1[] = "My name is ";
  char Str2[] = "Nazmul Hasan";

  strcat(Str1, Str2);

  printf("%s\n",Str1);
  printf("%s",Str2);


  return 0;
}

Keep Learning with PrologiCode.

Leave a Comment