Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
- #include <malloc.h>
- #define N 4
- #define LINE 10
- int main(void)
- {
- int **array;
- int i;
- array = malloc(sizeof(int) * N);
- for (i=0;i<N;i++)
- {
- array[i] = malloc(sizeof(int) * LINE);
- }
- for (i=0;i<N;i++)
- {
- array[i] = realloc(array[i], sizeof(int) * LINE * 2);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement