In the following code:
const int a=100;
void myFunc(int d)
Q1. const int a will be in .rodata? Will it be copied to RAM by cstartup code? If not, how would the program access this const variable?
Q2. int b is stored in which section? It will be copied to RAM .data by cstartup code?
Q3. int c will be in .data (RAM), and initialized to zero by cstartup code?
Q4. When myFunc(5) is executed, int d (which is 5), int f will be in stack?
Q5. How about int e? It is initialized, so should it be in .data? But it is also a local variable, so it should be in stack?