Consider the following struct definitions, which represent a point on the Cartes
ID: 3632434 • Letter: C
Question
Consider the following struct definitions, which represent a point on the Cartesian plane, and a rectangular region on the Cartesian plane, respectively.struct point {
int x; /* x coordinate */
int y; /* y coordinate */
};
struct rectangle {
struct point bottomLeft;
struct point topRight;
};
Write a function named "sort" that sorts an array of rectangles by area, smallest to largest. The function takes two arguments: an array of struct rectangle, and the size of the array (an integer). If two rectangles have equal area, then their relative order in the sorted array does not matter.
void sort(struct rectangle *array, int size);
You may define additional functions in your solution.
Im honestly not sure were to start, please help!
Thank you!