Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <ctype.h>
- #include <string.h>
- int main()
- {
- char ham[100] = "Hey ";
- //strcat adds one string on to the end of another
- //make sure the original string is long enough to hold the additions
- strcat(ham, "Bucky ");
- strcat(ham, "you ");
- strcat(ham, "smell! ");
- printf("%s \n", ham);
- //strcpy replaces one string with another
- strcpy(ham, "Bucky is Awesome! ");
- printf("%s \n", ham);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement