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
The human eye, as well as the light-sensitive chemicals on color photographic film, respond differently to light sources with di
jeka57 [31]

Answer:

a) at T = 5800 k  

  band emission = 0.2261

at T = 2900 k

  band emission = 0.0442

b) daylight (d) = 0.50 μm

    Incandescent ( i ) =  1 μm

Explanation:

To Calculate the band emission fractions we will apply the Wien's displacement Law

The ban emission fraction in spectral range λ1 to λ2 at a blackbody temperature T can be expressed as

F ( λ1 - λ2, T ) = F( 0 ----> λ2,T) - F( 0 ----> λ1,T )

<em>Values are gotten from the table named: blackbody radiati</em>on functions

<u>a) Calculate the band emission fractions for the visible region</u>

at T = 5800 k  

  band emission = 0.2261

at T = 2900 k

  band emission = 0.0442

attached below is a detailed solution to the problem

<u>b)calculate wavelength corresponding to the maximum spectral intensity</u>

For daylight ( d ) = 2898 μm *k / 5800 k  = 0.50 μm

For Incandescent ( i ) = 2898 μm *k / 2900 k = 1 μm

3 0
3 years ago
Briefly explain how a jet moves
sergejj [24]

Answer:

Jet engines move the airplane forward with a great force that is produced by a tremendous thrust and causes the plane to fly very fast. All jet engines, which are also called gas turbines, work on the same principle. The engine sucks air in at the front with a fan. ... Spinning the turbine causes the compressor to spin.

Explanation:

yw

8 0
3 years ago
5 cause of a electrical problem​
cupoosta [38]

Answer:

1. Poor circuit protection

2.Grounding issue

3. lighting problem

4. Electrical shocks

5. High electricity bills

Explanation:

8 0
3 years ago
Write a naive implementation (i.e. non-vectorized) of matrix multiplication, and then write an efficient implementation that uti
erik [133]

Answer:

import numpy as np  

import time  

def matrixMul(m1,m2):      

   if m1.shape[1] == m2.shape[0]:  

       

       t1 = time.time()

       r1 = np.zeros((m1.shape[0],m2.shape[1]))

       for i in range(m1.shape[0]):

           for j in range(m2.shape[1]):

               r1[i,j] = (m1[i]*m2.transpose()[j]).sum()

       t2 = time.time()

       print("Native implementation: ",r1)

       print("Time: ",t2-t1)

       

       t1 = time.time()

       r2 = m1.dot(m2)

       t2 = time.time()

       print("\nEfficient implementation: ",r2)

       print("Time: ",t2-t1)

       

   else:

       print("Wrong dimensions!")

Explanation:

We define a function (matrixMul) that receive two arrays representing the two matrices to be multiplied, then we verify is the dimensions are appropriated for matrix multiplication if so we proceed with the native implementation consisting of two for-loops and prints the result of the operation and the execution time, then we proceed with the efficient implementation using .dot method then we return the result with the operation time. As you can see from the image the execution time is appreciable just for large matrices, in such a case the execution time of the efficient implementation can be 1000 times faster than the native implementation.

7 0
3 years ago
Hwan also wants to determine the depreciation balance for the first year and the last year of the useful life of the product har
Elden [556K]

In Menlo Park, California, Hwan Rhee is debating whether to launch ChargeAll, a software firm that will create full-room wireless chargers for any kind of mobile electronic device.

In Menlo Park, California, Hwan Rhee is debating whether to launch ChargeAll, a software firm that will create full-room wireless chargers for any kind of mobile electronic device. In order to examine the financial information for a startup loan that would pay for the components and product manufacture, Hwan is using an Excel worksheet. He requests your assistance in fixing mistakes and performing financial computations in the worksheet.

Visit the worksheet for loan analysis. Hwan requests that you fix the mistakes in the worksheet before he can compute the principal and interest payments on the loan.

To know more about software click here:

brainly.com/question/985406

#SPJ4

4 0
1 year ago
Other questions:
  • Air enters a compressor steadily at the ambient conditions of 100 kPa and 22°C and leaves at 800 kPa. Heat is lost from the comp
    11·1 answer
  • List irreversibilities
    11·1 answer
  • Barry wants to convert mechanical energy into electric energy. What can he use?
    5·2 answers
  • A company, studying the relation between job satisfaction and length of service of employees, classified employees into three le
    14·1 answer
  • Q.17) A 50-acre catchment containing cropland is converted ot a Qatar mail
    13·1 answer
  • Using an "AND" and an "OR", list all information (Equipment Number, Equipment Type, Seat Capacity, Fuel Capacity, and Miles per
    9·1 answer
  • 4 main causes of erosion
    12·1 answer
  • What are wheel cylinders used for?
    6·1 answer
  • A steam turbine receives steam at 1.5MPa and 220oC, and exhausts at 50kPa, 0.75 dry. Neglecting heat losses and changes in kinet
    6·1 answer
  • Which of the following best describes the basic purpose of the internet?
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!