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

Another question on Engineering

question
Engineering, 04.07.2019 18:20
For a gate width of 2 m into the paper, determine the force required to hold the gate abc at its location.
Answers: 1
question
Engineering, 04.07.2019 19:20
A21-tooth spur pinion mates with a 28-tooth gear. the diametral pitch is 3 teeth/in and the pressure angle is 20°, find the following values: the addendum, dedendum, circular pitch, tooth thickness, and base circle diameters.
Answers: 2
question
Engineering, 06.07.2019 03:10
Steel balls 12 mm in diameter are annealed by heating to 1150 k and then slowly cooled to 400 k in an air att 325 k and h -20 w/m2 k. assume the properties of the steel to be k- 40 w/m k,p 7800 kg/m3, and cp 600 j/kg k. a. determine whether lumped system method can be used to analyze this problem and if so why" b. determine the time required for the cooling process. c. determine the total amount of heat lost from each ball to the ambient air
Answers: 1
question
Engineering, 06.07.2019 03:10
Two slings are used to lift a girder of length l and uniform weight per unit length. what is the best position for the slings if the bending moment due to the weight of the girder is to be kept to a minimum?
Answers: 2
You know the right answer?
You have to write 3 subroutines which meet the following requirements: the first subroutine generate...
Questions
Questions on the website: 13722361