✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
A function int area(t_square sq) that computes the area of the square sq is given.
We would like to define a function int compare_squares(t_square sq1, t_square sq2) that compares two squares sq1 and sq2 based on their area. It returns a negative integer if sq1 has a smaller area than sq2, a positive integer if sq1 has a larger area than sq2, and 0 if both squares have the same area.
Among the following definitions, which one is correct ?