Hi i would like declare a array of size x, this size will be know at runtime (not a static declatrion). how to do that. An efficient way to do that.
I had structure like this
#define SIZE 50
struct abc {
int students[SIZE];
int age;
}
i would like read SIZE from some point at run time, instead of predefining it.
Edit : can we allocate memory for entire structure including array dynamically.
strcut abc {
int *students; // should point to array of SIZE.
int age;
}s;
can we get sizeof struct = size of entire struct(including array); ?