Question 11 Assume Program Running Little Endian Architecture Main Returned Would Values T Q24679656

C language[Question 1.1] Assume a program running on a little endian architecture. After main has returned, how would the values in the table have changed? (answer in hex) uint8 t * foo (uint32 t ** ptr) ( Address Data Data after Ox20C0x54 0x20D 0xFF Ox20E 0x00 Ox20F Ox82 0x210 Ox02 0x211 OxAB 0x212 0x20 0x213OxEF (* (*ptr) ) += 1048576; (*ptr)++i return ((uint8 t*) (*ptr)); int main () - uint32 t * ptr1 = (uint32 t *) 0x20c; uint8_t * ptr2 = (uint8_t *) 0x20c; *((uint8 t*) (0x20D)) -= 128; ptr2 += 4; *ptr2 l= 0x0F; ptr2 = foo (&ptr1) ; *ptr1 = ~(0x12345678) ptr2- return 0 NameAddress Value at pointer (ptr = ?) (*ptr ?) ptr1 ptr2 [Question 1.2] What does the volatile keyword mean? When should it be used?

[Question 1.1] Assume a program running on a little endian architecture. After main has returned, how would the values in the table have changed? (answer in hex) uint8 t * foo (uint32 t ** ptr) ( Address Data Data after Ox20C0x54 0x20D 0xFF Ox20E 0x00 Ox20F Ox82 0x210 Ox02 0x211 OxAB 0x212 0x20 0x213OxEF (* (*ptr) ) += 1048576; (*ptr)++i return ((uint8 t*) (*ptr)); int main () – uint32 t * ptr1 = (uint32 t *) 0x20c; uint8_t * ptr2 = (uint8_t *) 0x20c; *((uint8 t*) (0x20D)) -= 128; ptr2 += 4; *ptr2 l= 0x0F; ptr2 = foo (&ptr1) ; *ptr1 = ~(0x12345678) ptr2- return 0 NameAddress Value at pointer (ptr = ?) (*ptr ?) ptr1 ptr2 [Question 1.2] What does the volatile keyword mean? When should it be used? Show transcribed image text

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *