#include #include #include class cstring { char *s1, *s2; int len; public: cstring(char *x,char *y) { s1 = new char[strlen(x) + 1]; strcpy(s1, x); s2 = new char[strlen(y) + 1]; strcpy(s2, y); } cstring(cstring &ob) { len = strlen(ob.s1); cout << "Length of s1: " << len << "\n"; if (strcmp(ob.s1, ob.s2) == 0) cout << "The given two strings are equal\n"; else cout << "The given two strings are unequal\n"; char *temp = new char[strlen(ob.s1) + strlen(ob.s2) + 1]; strcpy(temp, ob.s1); strcat(temp, ob.s2); cout << "Concatenating the given two strings: " << temp << "\n"; len = strlen(temp); cout<<"Reverse of the string:"; while (len--) cout <> str1 >> str2; cstring ob1(str1, str2); cstring ob2(ob1); getch(); }