Advertisement
Guest User

Untitled

a guest
Jan 20th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. /*
  2. MIDTERMS EXAM
  3. RAMOS, Ronaldo T. Jr.
  4. */
  5. #include <iostream>
  6. #include <cstring>
  7. using namespace std;
  8. int main()
  9. {
  10. char str1[50] = "computer is a machine";
  11. char str2[50] = "capable of manipulating data";
  12. char str3[50] = "to be transformed through an information";
  13.  
  14. cout<<str1<<endl<<str2<<endl<<str3<<endl; // line 1 to 3
  15. strcat(str1,str2);
  16. strcat(str1,str3);
  17. cout<<str1<<endl; // line 4
  18. cout<<strcpy (str1,str2)<<endl; // line 5
  19. cout<<strlen(str3); // line 6
  20.  
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement