Concatenate two C Strings

#include <stdio.h>
int main (void)
{
    char s1[100];
    char s2[100];
    gets(s1);
    gets(s2);
    strcat(s1,s2); //concatenate s1 and s2
    printf("s1= %s\n",s1);
    system("pause");
    return 0;
}

0 comments:

Post a Comment