void foo() { uint8_t a=2; uint8_t b[]={b0, b1, b2}; // They are the last three digits of your A# uint8_t* c=b; uint8_t* d=&a; }
address | value | variable |
0x10C0 | d | |
0x10C1 | ||
0x10C2 | c | |
0x10C3 | ||
0x10C4 | b | |
0x10C5 | ||
0x10C6 | ||
0x10C7 | a |
Assume the variables are arranged in data memory as in the table below. Put the values of the variables in the table.
SOLUTION-
Address | Value | Variable |
---|---|---|
0x10C0 | 0xC7 | d |
0x10C1 | 0x10 | |
0x10C2 | 0xC4 | c |
0x10C3 | 0x10 | |
0x10C4 | b0 | b |
0x10C5 | b1 | |
0x10C6 | b2 | |
0x10C7 | 2 | a |
Note: I am using little endian format here. that's why (0xC4, 0x10) and (0xc7, 0x10) are stored in that order for c and d.
If it was big endian it would be stored in a different order.
IF YOU HAVE ANY DOUBT PLEASE COMMENT DOWN BELOW I WILL
SOLVE IT FOR YOU:)
----------------PLEASE RATE THE ANSWER-----------THANK
YOU!!!!!!!!----------
Get Answers For Free
Most questions answered within 1 hours.