Monday, June 13, 2011

Concatenate A Couple Of Strings


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


void main()
{char str1[20],str2[20];
int i;
clrscr();
puts("enter 2 strings (max 20 characters)");



gets(str1);
gets(str2);
strcat(str1,str2);
printf("\nthe concatenated string is %s",str1);
getch();
}



No comments:

Post a Comment