Question: 12. (10 pts) What does the following program print? Suppose you have the following C statements on a 32-bit little endian machine, show how the
12. (10 pts) What does the following program print? Suppose you have the following C statements on a 32-bit little endian machine, show how the following variables would be represented in the Stack just after main is called. Stack memory starts at address 0x 1000. Complete the following table with variable name, addresses and values. void swap(int a, int b) int temp -a; tmp: void main(int arg, char**argv) unsigned int x 0x7894; unsigned int y 0x1234; char b; unsigned int z=x&y: Variable Name swap(x, y): return 0:3 Address value 0x1000 After swap is called: Variable Name Address value 0x1000 Pa
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
