The malloc'd 2d array I have to work from is

```
1 1 1 1 1
1 1 1 1 1 
1 1 1 1 1
1 1 1 1 1

```

This isn't constructed from a [][] array but rather malloc'd memory separated by printf("\n");

I'd like to manipulate it and make a for loop to traverse through the list so the result is

```
1 2 3 4 5
2 4 6 8 10
3 6 9 12 15
4 8 12 16 25

```

so the result is

Row 1 \* Column 1-4
Row 2 \* Column 1-4 ...

Any help would be appreciated, I'm having a brain fart right now (just got out of class)

```
typedef struct array {
    int cols, rows;
    int *arr;
} array;

array mkSum(array node)
{
    int i;
    for (i = 1; i <= ((node.cols) * (node.rows)); i++) //goes through all 25
    {

        //CODE TO MANIPULATE

    }
    for (i = 0; i < ((node.cols) * (node.rows)); i++) //goes through all 25
    {
        if (i % node.cols == 0)
            printf("\n");
        printf(" %d", node.arr[i]); //prints out elements

    }
    return(node);
}

```

mkSum is called by passing in a pointer to the array which comes in as the one i have to work from (first example)

```
mkSum(array);

```