{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

You need to follow the comment exactly add labels as

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: tdio.h> #include <stdlib.h> int fib(int n) { int z; if (n <= 0 ) return 0; if (n==1 || n == 2 ) return 1; z = fib(n- 1) + fib(n- 2); return z; } int main() { int x, y; y = 0; x = fib(8); } Part A: Given the convention defined on the first page, what is the size of the activation frame of function fib()? 3pts Input parameter, 4 bytes; return address 4 bytes; return value 4 bytes, 1 local variable; 4 bytes. So the total is 16 bytes. Part B: When the above program executes, how many times will fib() be called? 4 pts Let N(k) be the number of times that fib(n)...
View Full Document

{[ snackBarMessage ]}