Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- int main(int argc, char *argv[]) {
- char *first, *second;
- first = malloc(22);
- if(first == NULL) {
- fprintf(stderr, "error : dynamic memory allocation.\n");
- exit(EXIT_FAILURE);
- }
- second = malloc(22);
- if(second == NULL) {
- fprintf(stderr, "error : dynamic memory allocation.\n");
- exit(EXIT_FAILURE);
- }
- strcpy(first, argv[1]);
- strcpy(second, argv[2]);
- free(first);
- free(second);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement