subject
Engineering, 19.11.2019 07:31 eliana12

The fibonacci sequence is the series of numbers 0, 1, 1, 2, 3, 5, 8, …. it is defined by the following mathematical expression, with x0 and x1 being 0 and 1, respectively: xn = xn-1 + xn-2 write a c program using the fork() system call that generates and prints the fibonacci sequence in the child process. the number of members in the sequence will be determined by a user provided as a user prompted input. make the parent process wait for the child process to complete before exiting. make the program print both the parent and child process ids. the program should perform the necessary error checking to only accept positive integers from the user. a failure of fork() should be caught and printed as an error message using err_sys call.

ansver
Answers: 3

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Air is to be cooled in the evaporator section of a refrigerator by passing it over a bank of 0.8-cm-outer-diameter and 0.4-m-long tubes inside which the refrigerant is evaporating at -20°c. air approaches the tube bank in the normal direction at 0°c and 1 atm with a mean velocity of 4 m/s. the tubes are arranged in-line with longitudinal and transverse pitches of sl- st 1.5 cm. there are 30 rows in the flow direction with 15 tubes in each row. determine (a) the refrigeration capacity of this system and (b) pressure drop across the tube bank. evaluate the air properties at an assumed mean temperature of -5°c and 1 atm. is this a good assumption?
Answers: 1
question
Engineering, 04.07.2019 18:10
Coiled springs ought to be very strong and stiff. si3n4 is a strong, stiff material. would you select this material for a spring? explain.
Answers: 2
question
Engineering, 04.07.2019 18:10
Adouble-strand no. 60 roller chain is used to transmit power between a 13-tooth driving sprocket rotating at 300 rev/min and a 52-tooth driven sprocket. a) what is the allowable horsepower of this drive? b) estimate the center-to-center distance if the chain length is 82 pitches. c) estimate the torque and bending force on the driving shaft by the chain if the actual horsepower transmitted is 30 percent less than the corrected (allowable) power.
Answers: 3
question
Engineering, 04.07.2019 18:10
Ifa component is made of two or more materials with different modulus of elasticity (e), it is called a composite member and we calculate the factor·n". mention the formula for calculating n". also, ifn> 1, explain what will happen to the 1. transformed.gi) ifn 1, what will happen to the material when transformed material when
Answers: 1
You know the right answer?
The fibonacci sequence is the series of numbers 0, 1, 1, 2, 3, 5, 8, …. it is defined by the followi...
Questions
question
Mathematics, 21.01.2021 23:20
question
Biology, 21.01.2021 23:20
Questions on the website: 13722365