Question: (a) (10 points) The following programming model contains in its code memory the indicated C program composed of 3 functions: the main function and two

(a) (10 points) The following programming model contains in its code memory the indicated C program composed of 3 functions: the main function and two functions that finds the maximum of 3 numbers (each which uses branching, if, instructions differently). You will be showing how the working memory is used during the execution of each function. Show how the variables are organized in the working memory for each function. Show the values are assigned to the variables. Be sure to show all values that are assigned and replaced. Record successive assignments to variables/parameters as follows (the ? indicates and unknown value): Using arrows show how values are copied between the working memories allocated to the functions. In the console window show the output of the program.

  1. (5 marks) The following programming model contains in its code memory the indicated C program composed of a single function, main. You will be showing how the working memory is used during the execution of main. Show how the given C program affects the contents of the working memory:
  • Show how the variables are organized in the working memory allocated to main.
  • values that are assigned and replaced. Record successive assignments to variables/parameters(a) (10 points) The following programming model contains in its code memorythe indicated C program composed of 3 functions: the main function and

imes New Rom12 Replace Heading 1 Heading 2 Heading 3 1 Normal 1 No Spac.. Heading 4Select er Font Paragraph Styles Editing Code Memory Working Memory include #define INC 0.3 void main) double x, y, z II some variables int counter; x-2.3 y0.0; counter10; while (counter0) if (counter840) if (counter 20) y-y INC x4.1 y z0.5 y+0.25 countercounter 2 UCT Using arrows show how values are copied between the working memories allocated to the functions. In the console window show the output of the program Code Memory Working Memory dousieA -20.3 man) dousieax Function that finda the maxiun value uaing neated A 4126

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!