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(void) {
- char *wyrazy[5];
- int i;
- for (i = 0; i < 5; i++) {
- char* x;
- x = malloc(128);
- scanf("%s", x);
- wyrazy[i] = malloc(strlen(x) + 1);
- strcpy(wyrazy[i], x);
- }
- for (i = 0; i < 5; i++) {
- printf("%s\n", wyrazy[i]);
- free(wyrazy[i]);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement