We cannot access only one element from an array. *
True
False
Answers
Answered by
0
Answer:True
Explanation:
Answered by
0
It's probably what is called the "struct hack". By allocating a large block of memory, the array becomes dynamic. The one element is just a placeholder to make it compile, in fact there will be many floats.
The dynamic array has to be the last element.
Use like this:
struct abc *ptr = malloc(sizeof(struct abc) + (N-1) * sizeof(float));
ptr->variable1 = N; /* usually store length somewhere in struct*/
so yes or true
Similar questions