Code Scrappers


Copy one string into other using strcpy C program


              #include<stdio.h>
              #include<stdlib.h>
              #include<string.h>

              void main()
              {
                  char s1[20], s2[20];

                  printf("\n enter the string 1 : ");

                  scanf("%s", s1);

                  strcpy(s2, s1);

                  printf("\n copied string : %s", s2);

              }


          



Output

    enter the string 1 : Codescrappers

    copied string : Codescrappers