Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main(void)
- {
- int rows = 2;
- int cols = 5;
- int **arrayy = malloc(sizeof(int*) * rows);
- for (int i = 0 ; i < rows ; i++) {
- int *line = malloc(sizeof(int) * cols);
- for (int j = 0 ; j < cols ; j++) {
- line[j] = i;
- }
- arrayy[i] = line;
- }
- int n = array_2d_sum(arrayy, rows, cols);
- printf("n = %d\n", n);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement