first define your structure.
Code:
struct car{
char make[12];
char model[12];
int year;
char color[12];
float price;
};
now you need to declare an array of the above type
Code:
struct car car_array[MAX];
This gives you an array of MAX number of your structure
now you can get input from user
Code:
for(int i=0; i<MAX; i++)
{
printf("\nEnter car make: ");
fgets(car_array[i].make, sizeof(make)-1, stdin);
/* code for rest of input */
}
now you can sort the array, what are you sorting by, make, model etc