Question: Please explain why the answer is what is is thoroughly. I am trying to study for my test. I will make sure to thumbs up!

Please explain why the answer is what is is thoroughly. I am trying to study for my test. I will make sure to thumbs up! thank you very much for your time. I dont really get structs.
struct point center(struct rectangle r) {
struct point c;
c.x = (r.upper_left.x + r.lower_right.x) / 2; c.y = (r.upper_left.y + r.lower_right.y) / 2; return c;
}
17. The following structures are designed to store information about objects in a Cartesian coordinate system struct point int x, y struct rectangle fint upper left x, upper left y, lower right x, lower right y; A point structure stores the x and y coordinates of a point. A rectangle structure stores the coordinates of the upper left and lower right corners of a rectangle. Write a function that computes the center of rectangle r, returning it as a point value. If either the x or y coordinate of the center isn't an integer, store its truncated value in the point structure
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
