 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you the use of strcpy predefined function which is available in C programming. Before starting, you can note my information, you can follow or subscribe my YouTube channel through the URL youtube.com slash sanjaygupta underscore tech school. You can download my programming app TechMS which is available on Google Play. In this video, I will be demonstrating you how you can use strcpy predefined function. This function copies content of a string into another. So its full form is string copy. So here in this program, I am including two header files. First one is stdio.h and then second one is string.h. Now inside main function, I am declaring two character arrays. First one is s1 and second one is s2. Using printf, I want to show the message enter string on console. To read that string, I am using gattus and the entered string will be stored inside s1. Now I want to copy the content of s1 into s2. So for that purpose, I am using strcpy. Then in parenthesis, I am passing s1 s2 comma s1. So here s2 is target string and s1 is source string. So content of s1 will be copied into s2. So now I can print s2 as output. So result equals to percent s comma s2. So here you can see I am printing the values of s2. So the content of s1 will be copied into s2 and the result will be displayed on console with the help of s2 string. So this way I have copied the content of s1 into s2 string. Now I am executing this code. I am entering sanjay and now I am pressing enter key. You can see the output. Result equals to sanjay is displayed on console. So this way the contents are copied successfully with the help of strcpy function. Now I am making it as a comment. So content will be provided into s1 but it will not be copied into s2 and I am printing s2. So let's see what happens now. Again I am entering sanjay. You can see the result. This time s2 is not printing anything. It is printing a garbage value because I have not copied anything into s2. So s2 is containing garbage value. That's why it is showing incorrect result. So if you want to copy a string into another then you can use predefined function that is strcpy and it is declared in string.h header file. Its full form is string copy. I hope you have understood how we can use strcpy predefined function. If you want to watch more programming related videos you can follow or subscribe my YouTube channel through the url youtube.com slash sanjay Gupta underscore tech school. You can download my programming app tech immense which is available on google play. Thank you for watching this video.