Pages

Concatenate two strings

Thursday, 18 July 2013
#include<stdio.h>
#include<conio.h>
#include<string.h>

void main()
{
     char c[200];
     char a[100];
     char b[100];
     clrscr();

     printf("Enter a string1:");
     gets(a);

     printf("Enter a string2:");
     gets(b);

     strcat( a,b);
     printf("%s",a);
     getch();
}

No comments:

Post a Comment