1answer.
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]
3 years ago
15

Consider the following program:

Engineering
1 answer:
EleoNora [17]3 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
Aaron needs to create a building design for a restaurant with colors that depict excitement and vibrancy. Which color can Aaron
zloy xaker [14]

Answer:

I'm no engineer, but blue and purple are cool colors and white is every color so I'd go with orange

7 0
3 years ago
Read 2 more answers
What is your name in face book​
nekit [7.7K]

Answer:

Why do you want to know...?

4 0
3 years ago
Read 2 more answers
A cylindrical container is 150mm in diameter and weights 2.25n when empty
stellarik [79]

Answer:

.

Explanation:

.

3 0
3 years ago
How do you use the brakes in an airplane?
Paraphin [41]

Answer:

When a pilot pushes the top of the right pedal, it activates the brakes on the right main wheel/wheels, and when the pilot pushes the top of the left rudder pedal, it activates the brake on the left main wheel/wheels. The brakes work in a rather simple way: they convert the kinetic energy of motion into heat energy.

3 0
3 years ago
What is a system that performs different functions according to a fixed schedule?
geniusboy [140]

<u>I'm pretty sure your answer is B, because Sequential Control operates during order like a schedule</u>

Sequential Control=A control system in which the individual steps are processed in a predetermined order, progression from one sequence step to the next being dependent on defined conditions being satisfied.

Tell me if I'm incorrect but, Hope this helps!

4 0
3 years ago
Read 2 more answers
Other questions:
  • Given int variables k and total that have already been declared, use a do...while loop to compute the sum of the squares of the
    15·1 answer
  • The direction of rotation of a dc series motor or a universal motor connected to a dc power source A) depends on the polarities
    15·1 answer
  • The velocity of a point mass that moves along the s-axis is given by s' = 40 - 3t^2 m/s, where t is in seconds. Find displacemen
    7·1 answer
  • Calculate the volume of a hydraulic accumulator capable of delivering 5 liters of oil between 180 and 80 bar, using as a preload
    6·1 answer
  • What friction rate should be used to size a duct for a static pressure drop of 0.1 in wc if the duct has a total equivalent leng
    9·1 answer
  • Describe carbonation as it applies to the four-stroke engine.
    9·2 answers
  • Is a unit of measurement for angles
    15·1 answer
  • A manager who focuses on the employees who enable a company to do business is human resource management. True True False False
    7·1 answer
  • One reason the shuttle turns on its back after liftoff is to give the pilot a view of the horizon. Why might this be useful?
    6·2 answers
  • When nondeterminism results from multiple threads attempting to access a shared resource such as a shared variable or a shared f
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!