Concatenate two strings

Program in C to concatenate two strings :

ALGORITHM:

    1. INPUT string1 in STR1[200]
    2. INPUT string2 in STR2[100]
    3. Calculate length of string 1 and store in len1
    4. Calculate length of string 2 and store in len2
    5. SET j=0
    6. for i=len1 to i<(len2+len1)
      SET STR1[i]=STR2[j]
      SET j+=1
    7. SET STR1[len1+len2]=”
    8. PRINT concatenated string STR1

C SOURCE CODE:

Leave a Reply

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