How to Copy String using strcpy() Function

In this C program, We will show “How to Copy String using strcpy() Function ” . So, let’s do it …

#include<stdio.h>
int main()
{
  char source[] ="C Programming";
  char target[20];

  strcpy(target,source);

  printf("Source String = %s\n",source);
  printf("Target String = %s",target);

  return 0;
}

Keep Learning with PrologiCode.

Leave a Comment