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:10
During a steady flow process, the change of energy with respect to time is zero. a)- true b)- false
Answers: 2
question
Engineering, 04.07.2019 18:10
The higher the astm grain size number, the finer the gran is. a)-true b)-false
Answers: 2
question
Engineering, 04.07.2019 18:10
Ahot wire operates at a temperature of 200°c while the air temperature is 20°c. the hot wire element is a tungsten wire of 5 um diameter and 2 mm in length. plot using excel current, heat transfer and heat generated by the wire for air velocity varying from 1-10 m/s in steps of lm/s? matlab the sensor voltage output, resistance, or assume nu 0.989 re033pr13 take air properties at tr (200°c20°c)/2 = 110°c properties of tungsten: c 0.13 kj/kg.k 3 p 19250 kg/m k (thermal conductivity) = 174 w/m.k
Answers: 2
question
Engineering, 04.07.2019 18:20
Atank with constant volume contains 2.27 kg of a mixture of water phases (liquid-vapor). in the initial state the temperature and the quality are 127 °c and 0.6, respectively. the mixture is heated until the temperature of 160 oc is reached. illustrate the process in a t-v diagram. then, determine (1) the mass of the vapor in kg at the initial state, (2) the final pressure in kpa.
Answers: 3
You know the right answer?
You have to write 3 subroutines which meet the following requirements: the first subroutine generate...
Questions
question
Mathematics, 12.01.2021 01:00
question
Mathematics, 12.01.2021 01:00
question
Health, 12.01.2021 01:00
question
Health, 12.01.2021 01:00
question
Mathematics, 12.01.2021 01:00
question
Mathematics, 12.01.2021 01:00
Questions on the website: 13722363