8.2.1: Function pass by reference: Transforming coordinates. Define a function CoordTransform() that transforms the function's first two input parameters xVal and yVal into two output parameters xValNew and yValNew. The function returns void. The transformation is new

Answers

Answer 1
Answer:

Answer:

The output will be (3, 4) becomes (8, 10)

Explanation:

#include <stdio.h>

//If you send a pointer to a int, you are allowing the contents of that int to change.

void CoordTransform(int xVal,int yVal,int* xNew,int* yNew){

*xNew = (xVal+1)*2;

*yNew = (yVal+1)*2;

}

int main(void) {

int xValNew = 0;

int yValNew = 0;

CoordTransform(3, 4, &xValNew, &yValNew);

printf("(3, 4) becomes (%d, %d)\n", xValNew, yValNew);

return 0;

}


Related Questions

Water exiting the condenser of a power plant at 45 Centers a cooling tower with a mas flow rate of 15,000 kg/s. A stream of cooled water is returned to the condenser at the same flowrate. Makeup water is added in a separate stream at 20 C. Atmosphericair enters the cooling tower at 30 C, with a wet bulb temperature of 20 C. The volumetric flow rate of moist air into the cooling tower is 8000 m3/s. Moist air exits the tower at 40C and 90% RH. Assume atmospheric pressure is at 101.3 kPa. Determine: a.T
Internal and external flow boiling regimes?
Can anyone tell me all the corrects answers to these? I’m sorry if this is the wrong subject I’m not sure what to put it under but I really need help!
Every time I take a photo, that photo has to be stored in a file somewhere within "My Files" correct?How would I be able to take that photo out of the file it was stored?
8. 15 A manual arc welding cell uses a welder and a fitter. The cell operates 2,000 hriyr. The welder is paid $30/hr and the fitter is paid $25/hr. Both rates include applicable overheads. The cycle time to complete one welded assembly is 15. 4 min. Of this time, the arc-on time is 25%, and the fitter's participation in the cycle is 30% of the cycle time. A robotic arc welding cell is being considered to replace this manual cell. The new cell would have one robot, one fitter, and two workstations, so that while the robot is working at the first sta tion, the fitter is unloading the other station and loading it with new components. The fitter's rate would remain at $25/hr. For the new cell, the production rate would be eight welded assemblies per hour. The arc-on time would increase to almost 52%, and the fitter's participation in the cycle would be about 62%. The installed cost of the robot and worksta tions is $158,000. Power and other utilities to operate the robot and arc welding equipment will be $3. 80/hr, and annual maintenance costs are $3,500. Given a 3-year service life, 15% rate of return, and no salvage value, (a) determine the annual quantity of welded assem blies that would have to be produced to reach the break-even point for the two methods. (b) What is the annual quantity of welded assemblies produced by the two methods work. Ing 2,000 hryr?​

Cody’s car accelerates from 0m/s to 45 m/s northward in 15 seconds. What is the acceleration of the car

Answers

Answer:

3 m/s²

Explanation:

Acceleration is calculated as :

a= Δv/ t

where ;

Δv = change in velocity

Δv = 45 - 0 = 45  m/s

t= 15 s

a= 45 /15

a= 3 m/s²

Assume that in orthogonal cutting the rake angle is 15° and the coefficient of friction is 0.15. a. Determine the percentage change in chip thickness when the coefficient of friction is doubled. Justify your answer. b. Determine the percentage change in chip thickness when the rake angle is increased to 25o . Justify your answer.

Answers

Answer:

Δr=20.45 %

Explanation:

Given that

Rake angle α =  15°

coefficient of friction ,μ = 0.15

The friction angle β

tanβ = μ

tanβ = 0.15

β=8.83°

2φ +  β - α  = 90°

φ=Shear angle

2φ + 8.833° - 15° = 90°

φ = 48.08°

Chip thickness r given as

r=(tan\phi)/(cos\alpha +sin\alpha\ tan\phi)

r=(tan48.08^(\circ))/(cos15^(\circ) +sin15^(\circ)\ tan48.08^(\circ))

r=0.88

New coefficient of friction ,μ'  = 0.3

tanβ' = μ'

tanβ' = 0.3

β'=16.69°

2φ' +  β' - α  = 90°

φ'=Shear angle

2φ' + 16.69° - 25° = 90°

φ' = 49.15°

Chip thickness r' given as

r'=(tan\phi')/(cos\alpha +sin\alpha\ tan\phi')

r'=(tan44.15^(\circ))/(cos49.15^(\circ) +sin49.15^(\circ)\ tan44.15^(\circ))

r'=0.70

Percentage change

\Delta r=(r-r')/(r)* 100

\Delta r=(0.88-0.70)/(0.88)* 100

Δr=20.45 %

An inventor claims that he wants to build a dam to produce hydroelectric power. He correctly realizes that civilization uses a lot more electricity during the day than at night, so he thinks he has stumbled upon a great untapped energy supply. His plan is to install pumps at the bottom of the dam so that he can pump some of the water that flows out from the generators back up into the reservoir using the excess electricity generated at night. He reasons that if he did that, the water would just flow right back down through the generators the next day producing power for free. What is wrong with his plan?

Answers

Answer:

The problem is that the pumps would consume more energy than the generators would produce.

Explanation:

Water has a potential energy associated with the height it is at. The higher it is, the higher the potential energy. When water flows down into the turbines that energy is converted to kinetic energy and then into electricity.

A pump uses electricity to add energy to the water to send it to a higher potential energy state.

Ideally no net energy woul be hgenerate or lost, because the generators would release the potential energy and pumps would store it again in the water. However the systems are not ideal, everything has an efficiency and losses. The losses would accumulate and the generator would be generating less energy than the pumps consume, so that system wastes energy.

What should be done is closing the floodgates to keep the water up in the dam at night producing only the power that is needed and releasing more water during the day.

In the hydrodynamic entrance region of a pipe with a steady flow of an incompressible liquid A. The average velocity increases with distance from the entrance.
B. The average velocity stays the same with distance from the entrance.
C. The maximum velocity increases with distance from the entrance.
D. The maximum velocity decreases with distance from the entrance.
E. B and C
F. B and D

Answers

Answer:

D. The maximum velocity decreases with distance from the entrance.

Explanation:

This is because over time, the pressure with with the incompressible liquid enters decreases with distance from the entrance

Answer:

C. The maximum velocity increases with distance from the entrance

Explanation:

As the fluid particles moves into the pipe, the layer of fluid in contact with the surface of the pipe come to a complete stop. This layer also causes the fluid

particles in the adjacent layers to gradually slow down as a result of friction between fluid molecules, leaving the fluid at the center of the pipe with the maximum velocity.

Since the fluid is incompressible, to make up for this velocity reduction, the velocity of the fluid at the mid-

section of the pipe has to increase to keep the mass flow rate through the

pipe constant. As a result, a velocity gradient develops along the pipe and the maximum velocity which is at the center of the pipe increases with distance from entrance.

Air expands adiabatically through a nozzle from a negligible initial velocity to a final velocity of 300 m/s, what is the temperature drop of the air, if air is assumed to be an ideal gas for which CP = (7/2)R?

Answers

The temperature drop of air if air is assumed to be an ideal gas for which C_p = ⁷/₂R is; Δt = 1546 K

We are given;

Final velocity; v₂ = 300 m/s

C_p = ⁷/₂R

At constant pressure, the change in enthalpy is;

Δh = C_p × Δt

Now, from first law of thermodynamics;

h₂ + (v₂²/2) = h₁ + (v₁²/2)

We are told initial velocity is negligible and as such v₁ = 0 m/s

Thus;

h₂ + (v₂²/2) = h₁ + 0

(h₁ - h₂) =  (v₂²/2)

Thus; Δh = v₂²/2

Finally;

C_p × Δt = v₂²/2

Δt = v₂²/2/(C_p)

Δt =  (300²/2)/(⁷/₂R)

where R is ideal gas constant = 8.314 Kj/kg.mol

Thus;

Δt = (300²/2)/(⁷/₂ × 8.314)

Δt = 1546 K

Read more at; brainly.com/question/24188841

Answer:

ΔH+U²/2=0

and

ΔH=C{p×ΔT

∴to get the temperature drop of air, you make ΔT subject of the formula

ΔT=-U²/2Cp

    =-300²/2×(7)/(2)×8.314

∴ΔT=-1546K

Explanation:

Which of the following results from the fact that skip signals refracted from the ionosphere are elliptically polarized?A. Digital modes are unusable

B. Either vertically or horizontally polarized antennas may be used for transmission or reception

C. FM voice is unusable

D. Both the transmitting and receiving antennas must be of the same polarization

Answers

Answer:

B

Explanation:

The fact that skip signals refracted from the ionosphere are elliptically polarized is a result of either vertically or horizontally polarized antennas may be used for transmission or reception.