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
Annette [7]
3 years ago
10

Assuming that the actual process ids of the parent and child process are 2600 and 2650 respectively, what will be printed out at

lines A, B, C, D, E, and F? Be sure to explain your answers. int main() { pid_t x, y; int value = 90; value += 30; /* fork a child process */ x = fork(); if (x < 0) { /* error occurred */ fprintf(stderr,"Fork failed"); return(1); } else if (x == 0) { /* child process */ y = getpid(); printf("child: x = %d",x); /* A */ printf("child: y = %d",y); /* B */ value += 20; printf("child: value = %d\n", value); /* C */ exit(0); } else { /* parent process */ y= getpid(); printf("parent: x = %d",x); /* D */ printf("parent: y = %d",y); /* E */ wait(NULL); printf("parent: value = %d\n", value); /* F */ } }
Computers and Technology
1 answer:
VashaNatasha [74]3 years ago
4 0

Answer:

Output explanation to the given code can be defined as follows:

Explanation:

In A the output is 0 , It will return fork value of the child process that is 0. so, 0 is printed during child process.  

In B the output is 2650 , in which the getpid() method returns the child process id  value that is 2650.  

In C the output is 140, As it is declared in key, all process have their own "value" copies. 20 are inserted during childhood, so 140 are written.  

In D the output is 2650, its fork() method returns the child ID to the parent process. so the value 2650 is printed.  

In E the output is 2600, Its getpid() method will returns parent process id  that is equal to 2600.  

In F the output is 120 Since the value is declared in primary, all process so their own "value" copies. 120 will be printed during process.

You might be interested in
IF YOU GET THIS RIGHT U GET BRAINLIEST
Bumek [7]
False
                                                     false
 its false im fr 
5 0
4 years ago
Read 2 more answers
Which letter is located at position (7,4) on this coordinate grid? A) B) C) D)
aleksklad [387]

It is letter d

gdstcccccccvdagjsbhbj cna cas

8 0
3 years ago
Communication protocols, sets of rules agreed to by all parties, are designed in order to:
mote1985 [20]

Group of answer choices.

A. Ensure that cell phones and laptops cannot communicate.

B. Give each country its own internet language.

C. Ensure that new technologies and devices that haven't been invented yet can all use the same methods of communication.

D. Assure that computers and other devices don't pollute the environment.

Answer:

C. Ensure that new technologies and devices that haven't been invented yet can all use the same methods of communication.

Explanation:

OSI model stands for Open Systems Interconnection. The seven layers of OSI model architecture starts from the Hardware Layers (Layers in Hardware Systems) to Software Layers (Layers in Software Systems) and includes the following;

1. Physical Layer

2. Data link Layer

3. Network Layer

4. Transport Layer

5. Session Layer

6. Presentation Layer

7. Application Layer

Each layer has its unique functionality which is responsible for the proper functioning of the communication services.

Additionally, a standard framework for the transmission of informations on the internet, it is known as the internet protocol suite or Transmission Control Protocol and Internet Protocol (TCP/IP) model. One of the very basic rule of the TCP/IP protocol for the transmission of information is that, informations are subdivided or broken down at the transport layer, into small chunks called packets rather than as a whole.

Hence, communication protocols, sets of rules agreed to by all parties, are designed in order to ensure that new technologies and devices that haven't been invented yet can all use the same methods of communication.

This ultimately implies, there exist standard frameworks and protocols that are designed and developed to serve pre-existing technologies and devices, as well as those that would be invented in the future.

For example, SMTP is an acronym for Simple Mail Transfer Protocol and it uses the standard port number of 25 to provide clients with requested services on an internet-enabled device.

3 0
3 years ago
As text is typed in the _____ text box, a drop-down list displays options for completing the action, displaying information on t
pickupchik [31]

Answer:

Excel Help

Explanation:

Press F1 key to open the excel help window

Or you can also click the excel help button to launch the help window.

Type for whatever you are seeking help for and you will notice suggestions as you type something. These suggestions include online and offline results. If there are too many results then try searching offline it will narrow down the results.

After typing the text and hitting enter, the excel help returns several related topics on the searched query. You can browse through these topics and get help from excel.

5 0
3 years ago
Is this correct? I say its B, but my friend says its D.
kari74 [83]

Answer:

b

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • Which statement about word processing software is true? A)You can use it to perform mathematical calculations.B) You can use it
    6·2 answers
  • ____ are types of changes that occur when text has been omitted from a document and must be inserted later.
    10·1 answer
  • In a linux script, the line ____ is important because it identifies the file as a script.
    5·1 answer
  • 2. Because technology is always changing, there are new applications being developed constantly. (1 point)
    9·2 answers
  • When completing an application what color ink do you use
    8·2 answers
  • Examine the following piece of code and determine the data type of the function's return value.
    11·1 answer
  • When a called function completes its task, it normally:_________a. logs its results b. terminates program execution normally c.
    5·2 answers
  • What is the first step in finding a solution to a problem? Choose a solution. Think of options to solve the problem. Try the sol
    6·1 answer
  • 3. Output the following:<br>a.<br>21%4​
    12·1 answer
  • A facility that is pre-wired for necessary telecommunications and computer equipment, but doesn't have equipment installed, is k
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!