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 08:00, hernandez09297
What is a scenario where records stored in a computer frequently need to be checked
Answers: 2
Computers and Technology, 23.06.2019 09:00, jeremytheprimerapper
Which best compares appointments and events in outlook 2010appointments have a subject man, and events do notappointments have a specific date or range of dates, and events do notappointments have a start and end time of day, and events do notappointments have a location option, and events do not
Answers: 2
Mathematics, 24.11.2020 06:00
Chemistry, 24.11.2020 06:00
Physics, 24.11.2020 06:00
Mathematics, 24.11.2020 06:00
Mathematics, 24.11.2020 06:00
Mathematics, 24.11.2020 06:00