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
Lorico [155]
3 years ago
8

Plssssssssssssss help quick

Computers and Technology
1 answer:
Aleksandr [31]3 years ago
3 0
What’s the question?
You might be interested in
What was the first e-commerce service?
docker41 [41]

The first e-commerce service would be A)Banking. Hope this helps.

8 0
3 years ago
Using the program below, explain what the output will be at LINE A. 1 #include 2#include 3#include 4 5 int value - 128; 6 7 int
slega [8]

Answer:

This is the complete correct program:

#include <stdio.h>

#include<sys/types.h>

#include<unistd.h>

int value = 128;

int main()

{

  pid_t pid;

  pid=fork();

  if (pid==0) /* child process */

  {

  value +=8;

  return 0; }

  else if (pid > 0) {/* parent process */

 wait (NULL);

 printf ("PARENT: value =%d\n" ,value); /* LINEA */

 return 0;

}

}

The output of the LINE A is:

PARENT: value = 128

Explanation:

The fork() function used in the program creates a new process and this process is the child process. The child process is same as the original process having its own address space or memory.

In the child process the value of pid is 0. So the if condition checks if pid==0. Then the child process adds 8 to the value of its variable according to the following statement  

value +=8;

Now the original process has value = 128. In else if part the parents process has the value of pid greater than zero and this portion of the program is of the parent process :

else if (pid > 0)

{ wait (NULL);

printf ("PARENT: value =%d\n" ,value);

return 0; }

So the value 128 is printed at the end in the output.

wait(NULL) is used to wait for the child process to terminate so the parent process waits untill child process completes.

So the conclusion is that even if the value of the variable pid is changed in the child process but it will not affect the value in the variable of the parent process.

5 0
3 years ago
Why is it important to think about the programming language to use?
Sloan [31]
In think is C or B in my opinion
6 0
3 years ago
Consider the following code: public static void mystery(int a) { System.out.println("A"); } public static void mystery(double a)
Feliz [49]

Answer:

The output is "A"

Explanation:

public class Solution {

   public static void main(String args[]) {

     mystery(7);

   }    

   public static void mystery(int a) { System.out.println("A"); }    

   public static void mystery(double a) { System.out.println("B"); }    

   public static void mystery(int a, double b) { System.out.println("C"); }    

   public static void mystery(double a, int b) { System.out.println("D"); }

}

In the code above; mystery is defined in four different ways called method overloading. Method overloading is when same method is defined with different parameters.

In the first case; mystery will be called if the argument is int.

In the second case; mystery will be called if the argument is double.

In the third case; mystery will be called if the arguments are int and double.

In the fourth case; mystery will be called if the arguments are double and int.

When mystery(7) is called; the mystery method requiring only int will be called and the output is "A".

3 0
3 years ago
A _______________ is a field that contains data unique to a record.
Andru [333]

A primary key is a field that contains data unique to a record

8 0
3 years ago
Other questions:
  • Naseer has inserted an image into his document but needs the image to appear on its own line.
    14·2 answers
  • How can a network design project benefit from the principles of itsm? How might itsm impede a network design project?
    11·1 answer
  • Which statement describes borders and shading ?
    13·1 answer
  • Which feature of virtualisation helps increase the IT productivity of a business
    14·1 answer
  • When you take a multiple-choice test, you are relying on ________, a means of retrieving information out of your long-term memor
    8·1 answer
  • Aaron is stating the main idea of what he read in his own words. He is _____.
    11·2 answers
  • Primary functions of lighting are sufficient light to...
    13·1 answer
  • Examples of email prividers​
    6·2 answers
  • Lee has changed the style of his table to make the header row stand out. Next, he wants to center the text in the header row and
    11·2 answers
  • Java question
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!