answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
3241004551 [841]
2 years ago
15

Consider the following program:

Engineering
1 answer:
EleoNora [17]2 years ago
5 0

Answer:

The solution of this question is given below in explanation section.

Explanation:

The correct answer to this question is A i.e. 112002 .

the correct code of this question is given below

#include  <stdio.h>

#include  <string.h>

#include  <sys/types.h>

//#include "csapp.h"

void end(void)

{

printf("2");

}

int main()

{

if (fork() == 0)

atexit(end);

if (fork() == 0)

printf("0");

else

printf("1");

exit(0);

}

/* $end forkprob2 */

when you run this program, fork function print different values.

However, it is noted that when you run the program repeatedly, it will show you different values. But the most possible value that this program will show is A.

The picture is attached of the running program to get the idea of code.

You might be interested in
A horizontal steel pipe having a diameter of 5 cm is maintained at a temperature of 50oC in a large room where the air (h = 6.5
11Alexandr11 [23.1K]

Answer:

55.67W/m

Explanation:

Attached is the full solution.

6 0
2 years ago
Your organization recently purchased 20 Android tablets for use by the organization's management team. To increase the security
Nastasia [14]
C! hope this helps i got it right
8 0
1 year ago
Read 2 more answers
A solid steel shaft has to transmit 100 kW at 160 RPM. Taking allowable shear stress at 70 Mpa, find the suitable diameter of th
MA_775_DIABLO [31]

Answer:

The diameter of the shaft is 80.5 mm.

Explanation:

Torsion equation is applied for the diameter of the solid shaft.

Step1

Given:

Power of the shaft is 100 kw.

Revolution per minute is 160 RPM.

Allowable shear stress is 70 Mpa.

Maximum torque is 20% more than the mean torque.  

Step2

Mean torque is calculated as follows:

P=T\omega

P=T(\frac{2\pi N}{60})

100\times 1000=T(\frac{2\pi 160}{60})

T=5968.31 N-m

Step3

Maximum torque is calculated as follows:

T_{max}=(1+\frac{20}{100})T

T_{max}=1.2T

T_{max}=1.2\times 5968.31

T_{max}=7161.97 N-m

Step4

Apply torsional equation for diameter of shaft as follows:

\tau _{max}=\frac{T_{max}}{\frac{\pi d^{3}}{16}}

70\times 10^{6}=\frac{7161.97}{\frac{\pi d^{3}}{16}}

d^{3}=5.211\times 10^{-4}

d=0.0805 m

or,

d=80.5 mm

Thus, the diameter of the shaft is 80.5 mm.

7 0
2 years ago
An urn contains r red, w white, and b black balls. Which has higher entropy, drawing k ~2 balls from the urn with replacement or
svetlana [45]

Answer:

The case with replacement has higher entropy

Explanation:

The complete question is given:

'Drawing with and without replacement. An urn contains r red,  w white  and b black balls. Which has higher entropy, drawing k ≥ 2 balls from the urn with  replacement or without replacement?'

Solution:

- n drawing is the same irrespective of whether there is replacement or not.

-  X to denotes drawing from an urn with r red balls,  w white balls and b black balls. So, n = b + r +  w.

We have:

                                      p_X(cr) = r / n

                                      p_X(cw) = w / n

                                      p_X(cb) = b / n

- Now, if  Xi is the ith drawing with replacement then Xi are independent and p_Xi (x) = pX(x) for x e ( cr , cb , cw ).

- Now, let  Yi be the ith drawing with replacement where Yi are not independent p_Yi (x) = pX(x) for x ∈ X.

- To see this, note  Y1 =  X and assume it is true for  Yi and consider  Yi+1:

    p_Y(i+1) (cr) = p(Y(i+1),Yi).(cr, cr) + p(Y(i+1),Yi).(cr, cw) + p(Y(i+1),Yi).(cr, cb)

= pY(i+1)|Yi  (cr|cr)*pYi  (cr) +pY(i+1)|Yi  (cr|cw)*pYi (cw) + pY(i+1)|Yi  (cr|cb)*pYi (cb)

= r*( r - 1 )/n*(n-1) + w*r/n*(n-1) + b*r/n*(n-1) = r / n =  p_X(cr)

- This means, using the chain rule and the conditioning theore m:

H(Y1, Y2, . . . , Yn) =  H(Y1) +  H(Y2|Y1) +  H(Y3|Y2, Y1) + ... H(Yn|Yn−1, . . . , Y1)

=< SUM H(Yi) = n*H(X) =  H(X1, X2, . . . , Xn)

- with equality if and only if the  Yi were independent:

                          H(Y1, Y2, . . . , Yn) < H(X1, X2, . . . , Xn)

Answer: The case with replacement has higher entropy

   

4 0
2 years ago
The products of combustion from a burner are routed to an industrial application through a thin-walled metallic duct of diameter
Marysya12 [62]

Answer:

0.11m

Explanation:

Thermal resistance can be rightly defined as a heat property and a measurement of a temperature difference by which an object or material resists a heat flow.

Please for the detailed step by step solution of the given problem, check the attached file.

6 0
2 years ago
Other questions:
  • Outline an algorithm in **pseudo code** for checking whether an array H[1..n] is a heap and determine its time efficiency.
    6·1 answer
  • The density of a liquid is to be determined by an old 1-cm-diameter cylindrical hydrometer whose division marks are completely w
    11·1 answer
  • A sign erected on uneven ground is guyed by cables EF and EG. If the force exerted by cable EF at E is 46 lb, determine the mome
    13·1 answer
  • The outer surface of an engine is situated in a place where oil leakage can occur. When leaked oil comes in contact with ahot su
    6·1 answer
  • 1. Consider a city of 10 square kilometers. A macro cellular system design divides the city up into square cells of 1 square kil
    10·1 answer
  • simple power system consists of a dc generator connected to a load center via a transmission line. The load power is 100 kW. The
    11·1 answer
  • A plane wall of thickness 2L = 60 mm and thermal conductivity k= 5W/m.K experiences uniform volumetric heat generation at a rate
    9·1 answer
  • Convert 273.15 mL at 166.0 mm of Hg to its new volume at standard pressure.​
    8·1 answer
  • What are some goals of NYFEA? Select three options.
    9·2 answers
  • Alicia had to get over her fear of heights in order to become comfortable maintaining the generators in wind turbines. professio
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!