1. Different sections of memory like code, data, stack etc
2. what is bss section, what is stored in that
3. How a volatile keyword prevents optimization, give an example
4. How to detect a stack overflow. How to calculate stack size needed for your system.
5. While executing a firmware and stop at a breakpoint how to find what is the max stack size reached so far.
6.Given an integer of 32bits, start bit position and end bit position, clear all the bits between start and end bits including those two.
7.What is the value of A-val and B-val in the below code
void fun(char* p)
{
printf("B-val %d",(int)sizeof(*p));
}
int main()
{
char table[8][8] = {1,2,3,4,5,6,7,8};
char *p = &table[0][0];
printf("A-val %d",*(p+4));
fun(p);
return 0;
}