1. Write a function, double_array(int row, int col), which returns a pointer to a struct called Double_Array. The Double_Array struct holds an uninitialized 2 dimensional double array, the row size, and the column size (accessed using .array, .rowsize, .colsize respectively).
Note:
2. Using the function rand_double() you used in Lab Assignment 2, write a function randomize_array(struct Double_Array *, double, double) that takes a Double_Array struct, and two values of type double and initializes each element of the array in Double_Array to a randomly generated value between the two input values (inclusive).
3. Create a function called print_array() that takes a Double_Array struct pointer and prints the array with each element displaying 1 decimal place, with the column elements lining up vertically.
4. Create a function called free_array() which takes a Double_Array struct pointer and frees the struct as well as the array within it.
5. Create a function called swap_rows(struct Double_Array *, int, int) where the two integer are row numbers to be swapped. Make sure each row number is valid according to the structure. If valid the rows are swapped and the function returns 1, otherwise the rows are not swapped and the function returns 0.
6. Create a function called swap_columns(struct Double_Array *, int, int) where the two integer are column numbers to be swapped. Make sure each column number is valid according to the structure. If valid the columns are swapped and the function returns 1, otherwise the columns are not swapped and the function returns 0.
7. Create a main() called a2_q1.c that performs the following:
-------------------------------------
Question 1
-------------------------------------
Make sure you free all malloced memory before exiting the program.