subject

Using the C program shown below, explain what the output will be at lines X and Y.

#include
#include
#include
#define SIZE 5

int nums[SIZE] = {0,1,2,3,4};

int main()
{
int i;
pid_t pid;
pid = fork();
if (pid == 0) {

for (i = 0; i < SIZE; i++)
{ nums[i] *= -i;
printf("CHILD: %d ",nums[i]); /* LINE X */
}
}

else if (pid > 0) {
wait(NULL);
for (i = 0; i < SIZE; i++)
printf("PARENT: %d ",nums[i]); /* LINE Y */
}
return 0;
}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 21:40
Develop a function to create a document in the mongodb database “city” in the collection “inspections.” be sure it can handle error conditions gracefully. a. input -> argument to function will be set of key/value pairs in the data type acceptable to the mongodb driver insert api call b. return -> true if successful insert else false (require a screenshot)
Answers: 2
question
Computers and Technology, 23.06.2019 00:00
Suppose you have 9 coins and one of them is heavier than others. other 8 coins weight equally. you are also given a balance. develop and algorithm to determine the heavy coin using only two measurements with the of the balance. clearly write your algorithm in the form of a pseudocode using the similar notation that we have used in the class to represent sorting algorithms
Answers: 1
question
Computers and Technology, 23.06.2019 08:00
Which argument is not a valid filter? does not equal this quarter filter by cell color all of these are valid filter arguments.
Answers: 2
question
Computers and Technology, 23.06.2019 21:10
Asample of 200 rom computer chips was selected on each of 30 consecutive days, and the number of nonconforming chips on each day was as follows: 8, 19, 27, 17, 38, 18, 4, 27, 9, 22, 30, 17, 14, 23, 15, 14, 12, 20, 13, 18, 14, 20, 9, 27, 30, 13, 10, 19, 12, 26. construct a p chart and examine it for any out-of-control points. (round your answers to four decimal places.)
Answers: 2
You know the right answer?
Using the C program shown below, explain what the output will be at lines X and Y.

#incl...
Questions
question
Mathematics, 19.02.2021 01:10
question
Mathematics, 19.02.2021 01:10
question
English, 19.02.2021 01:10
question
English, 19.02.2021 01:10
Questions on the website: 13722367