Using the C program shown below, explain what the output will be at lines X and Y.
#incl...
Computers and Technology, 05.03.2020 10:12 sarbjit879
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;
}
Answers: 2
Computers and Technology, 23.06.2019 05:00
Jason works as an accountant in a department store. he needs to keep a daily record of all the invoices issued by the store. which file naming convention would him the most?
Answers: 2
Computers and Technology, 23.06.2019 08:00
The managing director of a company sends a christmas greeting to all his employees through the company email. which type of network does he use? he uses an .
Answers: 3
Computers and Technology, 23.06.2019 15:20
What does a bonus object do? a. subtracts lives b. keeps track of a player's health c. gives a player an advantage d. makes text appear
Answers: 1
Computers and Technology, 23.06.2019 23:00
Lucas put a lot of thought into the design for his company's new white paper. he made sure to include repeating design elements such as color schemes and decorative images. his goal was to a.add symmetry b.create a unified publication c.provide consistency d.save money
Answers: 1
Mathematics, 12.09.2021 03:40
History, 12.09.2021 03:50
Mathematics, 12.09.2021 03:50
Mathematics, 12.09.2021 03:50
Biology, 12.09.2021 03:50
Mathematics, 12.09.2021 03:50
Mathematics, 12.09.2021 03:50
Mathematics, 12.09.2021 03:50
Mathematics, 12.09.2021 03:50