subject
Engineering, 25.11.2019 23:31 nicpinela1234

You have to write 3 subroutines which meet the following requirements: the first subroutine generates the 10th number in the fibonacci series starting with 0 and prints only the 10th number. the second subroutine prints "n" numbers in the fibonacci series. for this subroutine, the value of n is put in the stack segment before the subroutine call. the subroutine has to access the value from the stack. the third subroutine generates the 10th number in the fibonacci series and prints only the 10th number. furthermore, during the number generation process, each number is stored in a cache of size 5. for simplicity, assume that the nth number is stored in n mod 5 index of the cache. for example, 0th number is stored in cache location 0, 5th number is also stored in cache location 0, 3rd number is stored in cache location 3, and 8th number is stored in cache location 3.the main program first calls subroutine 1 and then calls subroutine 2 with 10 as parameter. then, it calls subroutine 3 followed by subroutine 2 with 5 as parameter. finally, the main program prints the contents of the cache. the two outputs should be the same but the second will execute faster because caching in this case is saving instruction cycles.

ansver
Answers: 2

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 12:10, Ryantimes2
On a average work day more than work place firs are reorted
Answers: 1
image
Engineering, 04.07.2019 18:10, settasav9641
Abrake has a normal braking torque of 2.8 kip in and heat-dissipating cast-iron surfaces whose mass is 40 lbm. suppose a load is brought to rest in 8.0 s from an initial angular speed of 1600 rev/min using the normal braking torque; estimate the temperature rise of the heat dissipating surfaces.
Answers: 3
image
Engineering, 04.07.2019 18:10, alyssabailey7545
Give heat transfer applications for the following, (i) gas turbines (propulsion) ) gas turbines (power generation). (iii) steam turbines. (iv) combined heat and power (chp). (v) automotive engines
Answers: 1
image
Engineering, 04.07.2019 18:20, 21megoplin
How much power could a wind turbine produce if it had the following specifications? cp = 0.45 -d=1.2kg/m3 d=50m v 5m/s
Answers: 2
You know the right answer?
You have to write 3 subroutines which meet the following requirements: the first subroutine generate...

Questions in other subjects:

Konu
Mathematics, 23.08.2019 03:30