Question: Question 1 The following programming model contains in its code memory the indicated C program composed of two functions, main and appendString (this function is


Question 1 The following programming model contains in its code memory the indicated C program composed of two functions, main and appendString (this function is very similar to the standard strcat function). You will be filling in the diagram (programming model) below and showing how the working memory is used during the execution of this function. Show how the given C program affects the contents of the working memory . . * Show how the arrays and variables occupy space in the working memory for each function. Show how the variables and arrays are initialized and updated by the program. Show the values are assigned the variable and elements in the array by the assignment instructions. Be sure to show all values that are assigned and replaced. Record successive assignments to variables/parameters as follows (the ? shows an unknown value) varName Z., 10 For arrays of type char, represent the array as shown below. Show the values in the array elements as literal value of type char For the pointer variable, use adr1, adr2, adr3, etc. as address values assigned to the pointer variable and draw a dashed line showing to which location in memory the address is referring trName Using arrows show how values are copied between the working memory allocated to the function main and the working memory allocated to the function appendStrinq. It is not necessary to show how address values are copied to the parameters that are pointers (the dashed arrows will suffice) Question 1 The following programming model contains in its code memory the indicated C program composed of two functions, main and appendString (this function is very similar to the standard strcat function). You will be filling in the diagram (programming model) below and showing how the working memory is used during the execution of this function. Show how the given C program affects the contents of the working memory . . * Show how the arrays and variables occupy space in the working memory for each function. Show how the variables and arrays are initialized and updated by the program. Show the values are assigned the variable and elements in the array by the assignment instructions. Be sure to show all values that are assigned and replaced. Record successive assignments to variables/parameters as follows (the ? shows an unknown value) varName Z., 10 For arrays of type char, represent the array as shown below. Show the values in the array elements as literal value of type char For the pointer variable, use adr1, adr2, adr3, etc. as address values assigned to the pointer variable and draw a dashed line showing to which location in memory the address is referring trName Using arrows show how values are copied between the working memory allocated to the function main and the working memory allocated to the function appendStrinq. It is not necessary to show how address values are copied to the parameters that are pointers (the dashed arrows will suffice)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
