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
Wittaler [7]
2 years ago
12

Can anyone answer this ​

Computers and Technology
1 answer:
Ivenika [448]2 years ago
7 0

Answer:

I dont see the question

Explanation:

You might be interested in
Write a parent program to fork(2) n processes where n is passed tothe program on the command line, and n can be from 1 to 10. Al
MrRissso [65]

Answer:

Complete code is given below:

Explanation:

#include <stdio.h>

#include <sys/types.h>

#include <unistd.h>

#include <time.h>

#include <sys/wait.h>

int main(int argc , char *argv[]){

pid_t mypid, childpid;

int status;

int i,n;

time_t t;

     

mypid = getpid();

printf("pid is %d.\n", mypid);

childpid = fork();

if ( childpid == -1 ) {

perror("Cannot proceed. fork() error");

return 1;

}

 

 

if (childpid == 0) {

 

 

mypid = getpid();

 

 

childpid = fork();

if ( childpid == -1 ) {

perror("Cannot proceed. fork() error");

return 1;

}

 

if (childpid == 0) {

 

mypid = getpid();

printf("Child pid is %d.\n", getppid());

 

childpid = fork();

 

 

if ( childpid == -1 ) {

perror("Cannot proceed. fork() error");

return 1;

}

random((unsigned) time(&t));

printf(" parent id = %d : Random = %d\n",mypid , (int)(random()% 100 +1));

printf("child id = %d : Random = %d\n",getpid , (int)(random()% 100 +1));

 

if (childpid == 0) {

 

printf("Child 2: I hinerited my parent's PID as %d.\n", mypid);

 

mypid = getpid();

printf("Child 2: getppid() tells my parent is %d. My own pid instead is %d.\n", getppid(), mypid);

 

sleep(30);

return 12;

} else return 15;

} else {

 

while ( waitpid(childpid, &status,0) == 0 ) sleep(1);

 

if ( WIFEXITED(status) ) printf("Child 1 exited with exit status %d.\n", WEXITSTATUS(status));

else printf("Child 1: child has not terminated correctly.\n");

}

} else {

printf(" fork() is ok and child pid is %d\n", childpid);

wait(&status);

 

if ( WIFEXITED(status) ) printf(" child has exited with status %d.\n", WEXITSTATUS(status));

else printf(" child has not terminated normally.\n");

}

 

return 0;

}

Output:

pid is 24503.

Child   pid  is 24565.

parent id = 24566 : Random = 87

child id = 1849900480 : Random = 78

pid is 24503.

Child 1  exited with exit status 15.

pid is 24503.

fork() is ok and child pid is  24565

child has exited with status 0.

6 0
3 years ago
Having reviewed dod wireless stig (ver6, release 1), sarah learns she may only utilize secnet 54 and ______________ for transmit
xeze [42]
<span>Sarah learns she may only utilize SecNet 54 and SecNet 11 for transmitting classified information up to top secret.
</span>

SecNet 11 Plus is a family of encrypted <span>802.11b wi-fi <span>networking products. The Army has also approved</span></span> SecNet 11<span> as part of the classified Navy Marine Corps Intranet (NMCI) wireless solution. There are many products in SecNet 11 family, such as SecNet 11 Plus PC card, the SecNet 11 Wireless ridge, and the SecNet 11 Key Fill Cable etc.</span>

7 0
3 years ago
Write a Java program that prompts the user to enter integer values for the sides of a triangle and then displays the values and
satela [25.4K]

Answer:

import java.util.Scanner;

public class triangle {

       public static void main (String [] args) {

           int sideOne, sideTwo, sideThree;

           Scanner in = new Scanner (System.in);

           System.out.println("Enter the first side of the triangle");

           sideOne = in.nextInt();

           System.out.println("Enter the secon side of the triangle");

           sideTwo = in.nextInt();

           System.out.println("Enter the third side of the triangle");

           sideThree = in.nextInt();

           if ( sideOne<=0||sideTwo<=0|| sideThree<=0){

               System.out.println(" The Values enter are "+sideOne+ "," +sideThree+ ","+sideThree+ " These values don't make a valid triangle");

           }

           else if ((sideOne + sideTwo> sideThree) || (sideOne+sideThree > sideTwo) || (sideThree+sideTwo > sideOne))

           {

               System.out.println ("The triangle is Valid");

           }

           else {

               System.out.println(" The Values enter are "+sideOne+ "," +sideTwo+ ","+sideThree+ " These values don't make a valid triangle");

           }

       }

Explanation:

for a Triangle to be Valid one of the three sides of the triangle must greater than the other two sides.  The code above enforces this condition using an if statement in combination with the Or Operator

The following conditions where enforced

side one, side two and side three != 0

Side One + Side Three > Side Two

Side Three + Side Two> Side One

Side Two + Side One > Side Three

7 0
3 years ago
Select the correct answer.
Softa [21]

Answer:

MY ANSWER IS B.

Explanation:

B.A+(B.C)

3 0
3 years ago
I need help, who is a great phone pin lock screen cracker?
svlad2 [7]

Answer:

738159

now it's depend on you.

4 0
2 years ago
Other questions:
  • In three to five sentences, explain how you would insert graphics using your word-processing software.
    7·2 answers
  • What uses HTML hypertext links that users can click to access different locations or information?
    11·1 answer
  • Reading for subject content follows the same steps as reading for entertainment. True or false.
    10·2 answers
  • What is an online recommendation engine?
    12·1 answer
  • A CPU has 32 KB cache, 2-way set associative, 16-byte block size. How many bits are required to use index each set in this cache
    6·1 answer
  • write the program or pseudocode algorithm that computes the product and average of three integers and display the results​
    7·1 answer
  • What is one effective way for employees to keep their skillsets current?
    8·2 answers
  • A file name extension provides what information about a file?
    6·1 answer
  • What changes can be done using image editing tool?<br> a) Resize b) Crop c) Resize and crop
    6·1 answer
  • A program that allows employees to choose their starting and ending times, as long as they are at work during a specified core p
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!