subject
Engineering, 06.11.2019 01:31 DrGeneric

Draw the runtime stack for the following c++ program. (show any global variables and include main in the runtime stack) explain. i really struggle with these types of questions

use

retaddr for the return address

retval for the return value

na not used

#include

using namespace std;

int ounces;

void size(int& ou, int lbs) {

ou = lbs*16;

}

int main() {

int lbs;

cout < < "enter number of pounds";

cin > > lbs;

size(ounces, lbs);

cout < < "you have " < < ounces < < "ounces";

return 0;

}

ansver
Answers: 1

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Shafts are machine elements that are used to a) carry axial loads b) direct shear loads c) transmit power d) rotate at constant speed e) none of the above circular and square shafts subjected to the same torque under the same circum behave a) the same way b) almost the same way
Answers: 2
question
Engineering, 04.07.2019 18:10
Assuming compressible flow of air and that the measurements are done at flagstaff a pitot static tube that gives the difference of total and static pressure measures 0.35 m of mercury. what is the velocity of air? assume the temperature to be 300k. (submit your excel or matlab calculation sheet)
Answers: 1
question
Engineering, 04.07.2019 18:20
Athin walled concentric tube exchanger is used to cool engine oil from 160°c to 60°c with water that is available at 25°c acting as a coolant. the oil and water flow rates are each at 2 kg/s, and the diameter of the inner tube is 0.5 m and the corresponding value of the overall heat transfer coefficient is 250 w/m2. oc. how long must the heat exchanger be to accomplish the desired cooling? cpwater=4.187 kj/kg-candcpengine el=2.035 kj/kg·°c, oil . 120]
Answers: 1
question
Engineering, 04.07.2019 19:10
Tom is having a problem with his washing machine. he notices that the machine vibrates violently at a frequency of 1500 rpm due to an unknown rotating unbalance. the machine is mounted on 4 springs each having a stiffness of 10 kn/m. tom wishes to add an undamped vibration absorber attached by a spring under the machine the machine working frequency ranges between 800 rpm to 2000 rpm and its total mass while loaded is assumed to be 80 kg a) what should be the mass of the absorber added to the machine so that the natural frequency falls outside the working range? b) after a first trial of an absorber using a mass of 35 kg, the amplitude of the oscillation was found to be 10 cm. what is the value of the rotating unbalance? c) using me-3.5 kg.m, find the optimal absorber (by minimizing its mass). what would be the amplitude of the oscillation of the absorber?
Answers: 3
You know the right answer?
Draw the runtime stack for the following c++ program. (show any global variables and include main in...
Questions
question
Mathematics, 20.09.2020 14:01
question
Mathematics, 20.09.2020 14:01
question
Mathematics, 20.09.2020 14:01
question
Mathematics, 20.09.2020 14:01
Questions on the website: 13722363