When declaring arrays in C they can be declared normally like:
int arr[10]
or they can also be declared inside a structure like:
struct structArr{
int sArr[10];
}s1;
- Will there be any memory or space tradeoff when using
s1.sArr[]instead ofarr[], if so why? - Is any one form more efficient and faster than the other?
What I personally think is that arr[] would be faster than s1.sArr[] but I don't know whether I am correct or not moreover I don't have a technical answer for it.