Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

COSC 504 Quiz oftware Design June 6, 2018 rrays and Linked Lists is is a closed

ID: 3898468 • Letter: C

Question

COSC 504 Quiz oftware Design June 6, 2018 rrays and Linked Lists is is a closed book and closed notes quiz. The singly linked list and doubly nked list questions, respectively, must use the struct definitions that appear low ruct nodetype struct dnode int data char newch; nodetype link; atring strdata; dnode rightlink; dnode leftlink; Write a subprogram that will create a two dimensional array of integer using the following criteria. Place the sum of the row and column values of a given location in the array as the content value at the given position. O-vvo

Explanation / Answer

//We are supposed to fill the array, such that each element in the array is the sum of the
row, and column index of that location. We're not returning anything here.
void fillArray(int array[][cols], int rows, int cols)
{
    for(int i = 0; i < rows; i++)
        for(int j = 0; j < cols; j++)
            array[i][j] = i + j;
}?

If this is not what you're looking for, just get back to me.