Question: Answer in C language. [40 points ( 4 each), 60 mins] CLO1 A. Considering the following programs and illustrate the required process in graphical form.
[40 points ( 4 each), 60 mins] CLO1 A. Considering the following programs and illustrate the required process in graphical form. Assume all necessary header files are included and all programs are syntactically correct. a. Illustrate a memory allocation for both type of dynamic memory allocation. void main() ( b. Draw the recursive stack of the following double *ptr1, "ptr2; int sum( int n) ptr2 = (double*) ca1loc (5, sizeof ( double ));) return 10 ; Show dummy addresses and garbage values to highlight else \begin{tabular}{|l|l} \hline the difference. & return n+sum(n1); \end{tabular} c. Draw the recursive stack of the following function, If we call fibonacel(3) with function, If we call fibonaccl(3) with n=3. d. Illustrate a memory allocation for the following int fibonacci (int n) structure object student1. struct dayi int date; char month [10]; int year; } \begin{tabular}{c|l} return 0; & int idi, id2; \\ else if (n=1) & char a; float p; \\ struct \end{tabular} struct day birthday
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
