Question: Run the C program below and complete the table showing all the variables. Add printf function calls to obtain the addresses and values of all

Run the C program below and complete the table showing all the variables. Add printf function calls to obtain the addresses and values of all 13 variables. (Count the array (ca) as 3 variable/values and also include argc and argv in the table). The table must show the Address, Name, Datatype, Scope, and Value of each variable on the stack. (Hint: use the sizeof function to double check your addresses.) Explain how different the actual memory allocations are from what you practiced by hand in the classes. (Don't just say like "it is totally different from what I thought." "It is randomly allocated." or any abstract impression.) int main(int argc, char* argv[]) { int num1, num2 = 13; char c = 'H'; float score1 = 12.5; char ca[3] = "Hi"; dummy(num2, c, ca, score1); /* pause here */ return 0; } void dummy(int x, char y, char * z, float w) { x++; y++; w = w + 2.3; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!