Question: CODE IN C PLEASE Problem 3 You are given the following typdef and function definitions: typedef struct double x, y; point type def for a
CODE IN C PLEASE


Problem 3 You are given the following typdef and function definitions: typedef struct double x, y; point type def for a point typedef struct point centre; double radius circle type def for a circle int read Point (point p) read a point return 1 if successful 0 if not if (2 scanf ("Slfslf &p->x, p y)) return 0; return 1 int read Circle (circle cp) read a circle return 1 if successful 0 if not compute area of circle and distance to origin if (0 read Point (&cp- centre) return 0; scanf ("Slf &cp- radius) return 1 You are to write a C function that includes a function named overlap that accepts two circles as parameters and returns 1 if the circles overlap i.e. have an area in common or 0 if the circles do not overlap. Touching does not count as overlap. One circle can be completely inside the other in which case they overlap. For example, the circles in (a) and (b) overlap but the circles in (c) and (d) do not: (a) (c) (d)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
