Question: C Program Data Structure Bubble Sort I am writing a function that takes a data structure pointer that is loaded with numbers and I want
C Program Data Structure Bubble Sort
I am writing a function that takes a data structure pointer that is loaded with numbers and I want to sort the points from greatest distance from (0,0) on a graph.
The data structure used is:
struct data {
int x;
int y;
}
the function is:
struct data* sort(struct data* array, int size);
Parameter: array An array of data
Parameter: size The size of the array
Return: A pointer to the sorted array
The points should be sorted based on distance from (0,0) on a graph
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
