Lab exercise programs in C plus plus
Please visit http://csprograms.in/ for more Computer Science programs.
Welcome..!!
Please visit
http://csprograms.in/
for more Computer Science programs.
Wednesday, 14 March 2012
16. C++ program to concatenate strings.
# include < iostream>
# include < string >
int main()
{
char str1[50], str2 [35];
cout < < “Enter string str1;”;
cin >> str1;
cout < < “Enter string str2:”;
cin >> str2;
strcat(str1,str2);
cout < < “strcat (str1, str2 ) : “< < str1;
return 0;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment