Can anyone tell me how is memory allocated for an array of structure? For example, If I have a structure like this:
typedef struct particle { /* Each particle is defined in a struct */
short q; /* charge */
float xPos; /* x position */
float yPos; /* y position */
}PARTICLE;
and in the main fuction I declare an array of this struct:
PARTICLE e_p [N];
How would the program store this array of particles in the memory? Thanks for help.