I am using the following code on linux platform and using the g++ compiler. (test.cc)
int a[10];
main() {
a[0]=1;
}
g++ test.cc
Size of a.out is 4706.
Change the length of the array from 10 to 100 size remains the same.
a[100] => 4706
a[1000] => 4706
a[10000] => 7574
Question: Why the size of a.out changed from 4076 to 7574
a[20000] => 4706
Question: Why the size is back to 4706 from the earlier 7574
Although this might not be strictly related to C++.