Tuesday, 26 March 2013

Concatenate of String or Character Array


By on 07:05

Concatenate of Strings:-

Function used-strcat.strcat function is used to connect two string together.

Q)Write a program to enter two string and join the strings.

Note:-You can also create this program in c++(c plus plus),java,c#(c sharp) languages etc. with the same logic(Functions may be differ).

P:void main()
{
char string1[40],string2[40];
printf("Enter first String");
gets(string1);
printf("Enter second String");
gets(string2);
strcat(string1,string2);
puts(string1);
getch();
}

If you have any query then leave your comments and don't forgot to follow me on Google+,Facebook,Twitter.

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...