Sunday, 6 January 2019

Filled Under:

Copy String with c program[c programming examples with output]

C programming examples with output

Copy String
Program

#include<stdio.h>
#include<string.h>
main()
{
      char source[]="C programming";
      char destination[50];
      strcpy(destination,source);
      printf("Source string: %s\n",source);
      printf("Destination string: %s\n",destination);
      return 0;
}

Output:
Source string: C programming
Destination string: C programming

0 komentar:

Post a Comment