Advertisement
Guest User

Untitled

a guest
Jan 16th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. #define _CRT_SECURE_NO_WARNINGS
  2. #include "stdafx.h"
  3. #include <iostream>
  4. #include <cstdlib>
  5. #include <iomanip>
  6. #include <string.h>
  7. using namespace std;
  8.  
  9. int main()
  10. {
  11. int s1, s2;
  12. cout << "Enter size of string 1: ";
  13. cin >> s1;
  14. char *A = new char[s1];
  15. cout << "Enter string 1: ";
  16. cin >> A;
  17. cout << "Enter size of string 2: ";
  18. cin >> s2;
  19. char *B = new char[s2];
  20. cout << "Enter string 2: ";
  21. cin >> B;
  22.  
  23. A = _strrev(A);
  24. strcat(A, B);
  25.  
  26. cout << A << endl;
  27.  
  28. system("pause");
  29. return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement