String copy in c using strcpy function


In C programming Language Copy  One string to another many ways like using strcpy , without using strcpy, useing UDF , using pointer using array …

here we provide source code of  String copy in c using strcpy inbuilt function which is in string.h a header file

 


Different type of definition code

write c program  given any string and copy another string  using strcpy inbuit function

c program code copy one string to another string  using strcpy function

Source code copy one string to another string  using strcpy function as well as User Defined Function

write source code copy one string to another string using strcpy function.


 

Source Code 

 

 

Output  String copy using strcpy function

Enter  String-1  : Micro
Enter  String-2 : Computer

String-1 is : Micro
String-2 is : Computer
Copy String-2 in a String-1 now…
String-1 is  : Computer
String-2 is : Computer

 

 

 


Program code Explain :

String Copy using strcpy function in this C program we apply strcpy inbuilt function which is in header file string.h

Copy one string to another String  using strcpy function in  C program it is simple to use strcpy  inbuilt function.
strcpy function have two string arguments   string-2  (A second parameter  argument )  copy  into  string-1 (A first  parameter argument)

syntax : strcpy(string-1,string-2);

 

(Visited 104 times, 1 visits today)

Leave a Reply

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


CAPTCHA Image
Reload Image