I recently got to know an integer takes 4 bytes from the memory.
First ran this code, and measured the memory usage:
int main()
{
int *pointer;
Each declaration makes a new variable suitable for the alignment options of the compiler which needs spaces between(starting address of a variable should be a multiple of 128 or 64 or 32 (bits) and this causes the inefficiency for memory of many variables vs one array). Array is much more useful to have the contiguous area.