Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- MIDTERMS EXAM
- RAMOS, Ronaldo T. Jr.
- */
- #include <iostream>
- #include <cstring>
- using namespace std;
- int main()
- {
- char str1[50] = "computer is a machine";
- char str2[50] = "capable of manipulating data";
- char str3[50] = "to be transformed through an information";
- cout<<str1<<endl<<str2<<endl<<str3<<endl; // line 1 to 3
- strcat(str1,str2);
- strcat(str1,str3);
- cout<<str1<<endl; // line 4
- cout<<strcpy (str1,str2)<<endl; // line 5
- cout<<strlen(str3); // line 6
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement