#include #define total 5 struct cars { int age; int mileage; char owner[5]; }; //Trying to make an array of car structures. But on the third run through the age input it crashes. //Try a,1,2 b,1,2, c,1,2, it will crash on last 1 int main(){ int counter = 0; int done ; struct cars cararray[counter]; while (counter != total) { printf("Type the Owner name for this car\n"); scanf("%s", &cararray[counter].owner); printf("Type the year of the car\n"); scanf("%d", &cararray[counter].age); printf("Type the # of the miles on the car\n"); scanf("%d", &cararray[counter].mileage); printf("Owner: = %s, Age: = %d, Mileage: = %d\n", cararray[counter].owner, cararray[counter].age, cararray[counter].mileage); counter++; } return 0; }