8x ex ex exzee07FFC ex2eee7FF4 8x20007FE8 ex20807FE4 s the stack need to pass th
ID: 2249684 • Letter: 8
Question
8x ex ex exzee07FFC ex2eee7FF4 8x20007FE8 ex20807FE4 s the stack need to pass the arguments when eadh of so following function is called? () int32 t fun2 (uint8 t a, uint16 t b, uint8_t c, int32_t d) (2) int32_t fun2(uint8_t a, uint16_t b, uint8_t c, int32_t d, (3) int32_t fun3(uint8_t a, int32_t b, int64_t c, (4) int32_t fun4(uint8_t a, int64 t b, int64t c, uint8 t e, int32 t f, uint8 t g) uint8_t d, int32_t e) uint8 t d, int32 t e) 5. Which register(s) holds th e return value in the following functions? (1)int16_t fun1) (2)int8_t fun2(Explanation / Answer
Answer:-4)1) Here function 'fun1' has four arguments, out of which argument d is of 32-bit or of four byte, b is of 16-bit or two byte. Rest a and c are of one byte only(8-bit). So function fun1 when called, stack will be pushed with 1+2+1+4 byte = 8 byte.
2) Similarly fun2, 1+2+1+4+1+4+1 = 14 byte.
3) For fun3, 1+4+8+1+4 = 18 byte
4) For fun4, 1+8+8+1+4 = 22 byte.
NOTE:- uint8_t means 8-bit or 1-byte. Similarly uint16_t menas 16-bit or 2-byte and so on.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.