Code Scrappers


Concat two strings with strcat C program


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

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

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

                    scanf("%s", s1);

                    printf("\n enter string 2 : ");

                    scanf("%s", s2);

                    strcpy(s3, s1);

                    strcat(s3, s2);

                    printf("\nConcatenated String : %s", s3);

              }


          



Output

    enter string 1 : code

    enter string 2 : scrappers

    Concatenated String : codescrappers