In the code below I have my cars array set to max length of 10000, but what should I do if I want to set the array size to a number that the user will input?
#define MAX 10000
typedef struct Car{
char model[20];
char numberCode[20];
float weight, height, width, length;
}cars[MAX];
mallocandfreefor the primitive types likeint? Then you know how to dynamically allocate memory for a structure as well.